Hi - I'm trying to send an email from my site which is using Silverstripe CMS. I've downloaded a module that supposed to overwrite Silverstripes smtp and use a phpmailer. The config code is: Email::set_mailer( new SmtpMailer() ); define('SMTPMAILER_SMTP_SERVER_ADDRESS', 'smtp.gmail.com'); # SMTP server address define('SMTPMAILER_DO_AUTHENTICATE', true); # Turn on SMTP server authentication. Set to false for an anonymous connection define('SMTPMAILER_USERNAME', '[email protected]'); # SMTP server username, if SMTPAUTH == true define('SMTPMAILER_PASSWORD', 'password'); # SMTP server password, if SMTPAUTH == true # Optional : define('SMTPMAILER_CHARSET_ENCODING', 'utf-8'); # E-mails characters encoding, e.g. : 'utf-8' or 'iso-8859-1' define('SMTPMAILER_USE_SECURE_CONNECTION', 'ssl'); # SMTP encryption method : Set to '' or 'tls' or 'ssl' define('SMTPMAILER_SMTP_SERVER_PORT', 465); # SMTP server port. Set to 25 if no encryption or tls. Set to 465 if ssl define('SMTPMAILER_DEBUG_MESSAGING_LEVEL', 0); # Print debugging informations. 0 = no debuging, 1 = print errors, 2 = print errors and messages, 4 = print full activity define('SMTPMAILER_LANGUAGE_OF_MESSAGES', 'en'); # Language for messages. I have the basic plan so I removed ssl and left it blank and set the port to 25. I added in my username and password. I've tried every combination I can think of. I tried the smtp server address and the mx server address and I'm getting an authenticate error. *** Debug mode is on, printing debug messages and not redirecting to the website: SMTP -> FROM SERVER:220 m05.internetmailserver.net SMTP -> FROM SERVER: 250-m05.internetmailserver.net Hello [96.31.35.11] 250-SIZE 31457280 250-AUTH LOGIN CRAM-MD5 250 OK SMTP -> ERROR: Password not accepted from server: 535 Authentication failed SMTP -> FROM SERVER:250 OK SMTP Error: Could not authenticate. If anyone can help at all - I've been trying to send an email via this form for weeks. I'm kind of new at this so even the very basic suggestions might be it. THANK YOU
Which SMTP server exactly were you trying to send with? The config on first line shows Gmail SMTP, debug output shows Winhost SMTP? If you are tyring to send using Gmail's, they require you to connect to the SMTP over SSL so its setting using SSL is a must. Debug output that is using our server simply means either your email or password is invalid. Make sure the mail user is exist and its password is correct.
I am not using gmail. I changed that in my code to match my mailserver through the Winhost. What I have is actually: define('SMTPMAILER_SMTP_SERVER_ADDRESS', 'mail.jtrainingsolutions.com'); # SMTP server address I have the basic plan which doesn't support ssl. Do you think the mailserver might still be trying to change it to SSL?
Hi -- Thank you - you gave me some ideas. I have a new error now: SMTP -> FROM SERVER:220 m05.internetmailserver.net SMTP -> FROM SERVER: 250-m05.internetmailserver.net Hello [96.31.35.11] 250-SIZE 31457280 250-AUTH LOGIN CRAM-MD5 250 OK SMTP -> FROM SERVER:250 OK Sender ok SMTP -> FROM SERVER:451 Greylisted, please try again in 900 seconds SMTP -> ERROR: RCPT not accepted from server: 451 Greylisted, please try again in 900 seconds SMTP Error: The following recipients failed: [email protected] This is a valid email address. I feel like I am making progress though.....Finally!
Hi Allegro13 - all -- Thank you so much. Your questions pushed me in the right direction and I got it to work! Learned a lot during this process....painful but worth it. Thanks! Megan