wordpress-heroku
wordpress-heroku copied to clipboard
can't send emails.
Heroku has disabled mail().
Try running heroku addons:add sendgrid:starter
and sending email again.
You can see the sendgrid documentation here: https://devcenter.heroku.com/articles/sendgrid
Thanks! I did though, it's visible in dashboard.heroku.com (also before I added the plugin, I just got a server error (because of missing username/password-parameters).
You might have to use this plugin and check the documentation on how to get your username and password. It's worth a shot!
If I added the settings that is:
// Set to use PHP's mail()
//$phpmailer->IsMail();
// Over ride and set to use SMTP. Set enviromental variables.
$phpmailer->IsSMTP();
$phpmailer->SMTPAuth = true; // enable SMTP authentication
$phpmailer->Port = 25; // set the SMTP server port
$phpmailer->Host = 'smtp.sendgrid.net'; // SMTP server
$phpmailer->Username = $_ENV["SENDGRID_USERNAME"]; // SMTP server username
$phpmailer->Password = $_ENV["SENDGRID_PASSWORD"]; // SMTP server password
$phpmailer->From = $bloginfo = get_bloginfo( 'admin_email', 'raw' );
$phpmailer->FromName = $bloginfo = get_bloginfo( 'name', 'raw' );
$phpmailer->Sender = $bloginfo = get_bloginfo( 'admin_email', 'raw' );
//$phpmailer->AddReplyTo($bloginfo = get_bloginfo( 'admin_email', 'raw' );, $bloginfo = get_bloginfo( 'name', 'raw' ););
Aren't those settings in the wp core? Its not usually a great idea to modify the wordpress core files. Well... i take that back... it's never a good idea to modify the core files.
@markrickert You probably aren't interested in this anymore but you were correct. SendGrid is the way to go here and I just submitted Pull Request #65 based on your recommendation after getting it to work on my wordpress-heroku install.
Thanks,
Jim
Hopefully someone can help me. Even though I added SendGrid to my app before pushing my master to Heroku, when I created the admin user account, the confirmation email wasn't sent. So when I attempt to login to WP it says my password is incorrect. If I try to reset the password I get a notice from WP saying that the host has disabled the mail() function.
All I have to go on in my web log is this:
WARNING: [pool www] child 48 said into stderr: "sh: -t: not found"
I can access my SendGrid dashboard from my Heroku app dashboard, so I'm kinda stuck! Anyone experience this before? Thanks.
I've experienced this error before. But, I'm not sure if I'll be able to get you to a full recovery because of a bit of config that needs to be done inside of the WP admin.
If you interrogate heroku config
you should see SENDGRID_PASSWORD
and SENDGRID_USERNAME
.
On the WP dashboard you need to configure sendgrid by adding the heroku config username and password.
Let me know if there is anything else I can do.