SMTP server response 530 5.7.0
Posted by: n0jpv (---.lightspeed.chtnsc.sbcglobal.net)
Date: October 13, 2014 03:13AM

I am running WAMP Server 2.5 64-bit on 64-bit Windows 7 Professional. PHP Version is 5.5.12, Apache Version is 2.4.9

I am trying to send mail from localhost

php.ini settings for mail are

SMTP = smtp.mail.me.com (Apple iCloud Mail)
smtp_port = 587 (from Apple's support page)
auth_username = <my email>@icloud.com
auth_password = <my password>
sendmail_from = <my email>@icloud.com

This is the error I get when I try to run the php script

Warning: mail(): SMTP server response: 530 5.7.0 No STARTTLS command has been given. in C:\wamp\www\contact.php on line 68

How can I resolve this error?

Options: ReplyQuote
Re: SMTP server response 530 5.7.0
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 13, 2014 10:05AM

Windows does not come with a mail server by default like *NIX systems, thankfully! Think Spam is an issue now!

If you install a mail server on your system, it is possible, see hMailer, you can set it up for testing purposes with an sending account that requires no authentication and still use the mail() function. However it is very unlikely that any REAL mail server will accept mail from you as you are not a known and verifiable source for mail. Your mail will just get rejected as potential SPAM

If you want to send outside a testing environment your best bet is to use a PHP mail library such as PHPMailer. This will allow you to autenticate to the server, and mail will be accepted.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.