Jump to:

22992 Posts in 11842 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » No from email address!

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 436 Views
  • simples
    Avatar
    Community Member
    76 Posts

    No from email address! Link to this post

    Hi,

    I have just spent all day trying to track down why an email was not being sent when I clicked on the lost password link using a fresh install after adding source files from http://www.ssbits.com/tutorials/2010/site-members-registering-users-and-allowing-them-to-edit-their-details/.

    I am using Version 2.4.7 on WAMP and turns out that I could solve it by adding the following line to mysite/code/_config.php.

    Email::setAdminEmail($_SERVER['SERVER_ADMIN']);

    This set the from address in the list of parameters sent to the 'send' function in Email.php. Without this 'from' is not set and no email is sent with no error message to say why.

    Did I miss something obvious here? I ask this because people must be hitting this issue a lot - or I have overlooked something obvious and my solution is not appropriate.

  • martimiz
    Avatar
    Forum Moderator
    1038 Posts

    Re: No from email address! Link to this post

    There can be many reasons why an e-mail is never sent, or sent but never received. I always make sure, if I can, that the sender e-mailaddres has the same domain name as the website, and that it is an existing e-mail address, most times this is enough to satisfy even very strict emailproviders. So setting the admin email is definitely a good idea. Something like noreply@xxxx.

    But there are other considerations as well and other people might explain things far better then I evr could... Example: for one of my testservers only one domain name is acepted by the smtp server I use, its admin person being very very cautious...

  • simples
    Avatar
    Community Member
    76 Posts

    Re: No from email address! Link to this post

    Hi martimiz,

    Thank you for the tips.

    436 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.