1

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 ?

Community
  • 1
  • 1
Whitney R.
  • 630
  • 4
  • 10
  • 20

1 Answers1

0

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.

Dipesh Parmar
  • 27,090
  • 8
  • 61
  • 90
  • the config it doesn't work. Can I change the port too (in php.ini) ? – Whitney R. Jan 25 '13 at 10:36
  • no don't change port....on which mail address are u sending mail...? – Dipesh Parmar Jan 25 '13 at 10:37
  • I sending and a receive my mail with the same address. [myAddress]@gmail.com – Whitney R. Jan 25 '13 at 10:40
  • try checking spam if its there...i am too much sure that first solution work because i am using it...and yah don't forget to restart php apache services to make it in action...do RESTART if u didn't... – Dipesh Parmar Jan 25 '13 at 10:41
  • no spam, I use WAMP it's the probleme ? I have always this error "SMTP server response: 550 The address is not valid." – Whitney R. Jan 25 '13 at 11:10
  • can you please paste your all php code with html form.? – Dipesh Parmar Jan 25 '13 at 11:22
  • mail("[My_eMail]@gmail.com", "Title", "textContent"); just this code, no form for this moment. – Whitney R. Jan 25 '13 at 12:54
  • Now, after restart all services I have this error: Failed to connect to mailserver at "aspmx.l.google.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() – Whitney R. Jan 25 '13 at 13:05
  • Can u please show me ur php.ini file code which u edited... – Dipesh Parmar Jan 25 '13 at 14:46
  • [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = aspmx.l.google.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = MY_ACCOUNT@gmail.com – Whitney R. Jan 25 '13 at 14:58