SMTP server local send mail php [duplicate]

2019-07-28 22:12发布

Possible Duplicate:
mail(): SMTP server response: 550 The address is not valid error on hmailserver

I would like test my class senderMail.php.

For to have, a smtp server, I use hMailServer. I have created a domaine, I have created a account, and now I configure SMTP settings.

hMailServer would like a configuration "SMTP RELAYER". I test with the information: smtp.gmail.com on port 587 and I enter my identifier too.

When, I have tested this with my class senderMail.php I have this error:

SMTP server response: 550 The address is not valid

Where come my error ? It's from SMTP RELAYER or a other config ?

1条回答
Evening l夕情丶
2楼-- · 2019-07-28 22:52

why don't you try it to send it directly from localhost.

  1. Go to your php.ini file and change SMTP = localhost to SMTP = aspmx.l.google.com and uncomment sendmail_from and put in your sending gmail address.

  2. In php, test it with mail("youremail]@gmail.com", "subject", "body");

Note: This only works when sending email to google hosted email addresses.

OR

try above if its not work use swiftmailer its php mail sending library which also allow to send mail through SMTP its really helpful during development.

查看更多
登录 后发表回答