Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Can't get SMTP emails to send with Amazon SES. Verified Amazon SES is working fine.

SadakoSadako
edited October 2013 in Vanilla 2.0 - 2.8

Version: 2.1b1.17

I filled out the SMTP settings in the Outgoing Email settings. Hostname, username, password, port 25, and TLS security as per instructions on Amazon SES.

Server Name: email-smtp.us-east-1.amazonaws.com
Port: 25, 465 or 587
Use Transport Layer Security (TLS): Yes
Authentication: Your SMTP credentials - see below.

I tried PM'ing myself, and pm'ing on a second account, and notifications that a PM is received isn't received.

I did a test case to verify that Amazon is working fine, and it does. So it seems like a Vanilla issue and I don't have an idea of how to debug it.
`require_once('class.phpmailer.php');

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth   = true;
$mail->SMTPSecure = "tls";
$mail->Host       = "email-smtp.us-east-1.amazonaws.com";
$mail->Username   =  /*Username*/;
$mail->Password   = /*Password*/;

$mail->SetFrom('mail@example.org', 'Notifier'); //from (verified email address)
$mail->Subject = "Test notification"; //subject

$body = "This is a test message.";
$mail->MsgHTML($body);

$mail->AddAddress("test@example.org", "Test Recipient");

//Success
if ($mail->Send()) {
    echo "Message sent!"; die;
}`

And yes, I made sure that settings for the user say to receive notification emails.

Comments

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Welcome to the community!

    Please upgrade to 2.1b2 and make sure it is still an issue.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    SadakoSadako
    edited October 2013

    When I try to upgrade (followed: http://www.vanillaforums.org/discussion/12740/vanilla-2-upgrading-tips ) I get an error when trying to view the dashboard. Though I can view the forum itself.

    `Fatal Error in Gdn_Database.Query();
    Table 'vanilla.GDN_Flag' doesn't exist
    select DISTINCT(fl.ForeignID) as 'NumFlaggedItems' from GDN_Flag fl group by ForeignURL
    The error occurred on or near: /public/forum/library/database/class.database.php

    297: $PDOStatement = $this->Connection()->query($Sql);
    298: }
    299:
    300: if ($PDOStatement === FALSE) {
    301: trigger_error(ErrorMessage($this->GetPDOErrorMessage($this->Connection()->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
    302: }
    303:
    304: // Did this query modify data in any way?
    305: if ($ReturnType == 'ID') {`

    I'm guessing tables changed between 2.1b1.7 and 2.1b2? Even though that upgrade page implies it should be necessary from going from <2 to 2+.

    Well I did the update and now I'm looking..

  • Options

    Alright. I updated to 2.1b2 and it's still not sending nofication emails.

    I reset the setting into the Outgoing Email settings, the same ones that work in my test case, but Vanilla isn't sending them out.
    I have debug mode set on in the config, and there aren't any errors.

  • Options

    port 25 is not usually used for tls, it is normally for unsecured.

    grep is your friend.

  • Options
    SadakoSadako
    edited October 2013

    Worked fine in my test.

    Not to mention, Amazon's instructions as noted at the start:

    Server Name: email-smtp.us-east-1.amazonaws.com

    Port: 25, 465 or 587

    Use Transport Layer Security (TLS): Yes

    I tried 465 and it didn't work either.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Have you tried 465 or 587?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    SadakoSadako
    edited October 2013

    On my example, 465 times out and gives

    Notice: fputs(): send of 23 bytes failed with errno=32 Broken pipe in /public/class.smtp.php on line 494 Language string failed to load: tls Mailer Error: Language string failed to load: tls

    Port 25 works. 587 works.

    One email did go through with Vanilla. Trying to figure out what the settings were. :/
    The SMTP settings keep being cleared out when I go to Dashboard and check Outgoing Email settings again.

    Now I see, the config wasn't saving, and it wasn't giving an error about it.

  • Options
    ShadowdareShadowdare r_j MVP
    edited October 2013

    @Sadako said:
    Now I see, the config wasn't saving, and it wasn't giving an error about it.

    I would use port 587 since 465 doesn't work. Usually the config doesn't save properly if the write permissions for the files and folders aren't set correctly or if you have something like PHP APC installed with apc.stat = 0, which causes it to not see the updated config.php file.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.