I had created the php script which is used to send email to all the folk on their mentioned email id, but after clicking on the submit button i received an error message
Warning: mail(): SMTP server response: 530 5.7.1 Client was not authenticated
my company using windows server 2008 R2
Please guys help me out. Its really very important for my project
Please find the test code below
mail($email, $subject, $message,"From:".$from);
print "email has been sent : </br> $email</br>$subject</br>$message</br>";
I think you might need something like http://phpmailer.codeworxtech.com/in...?pg=tutorial#2 - have also used blat in the past but PHP mailer seems to be what all the kids are using these days!
It can be difficult getting the PHP’s default mail functions to work when you run an apache server on windows instead of a unix environment.
Go to the XAMPP directory (often C:\xampp\), then open the ’sendmail’ subdirectory. You’ll most likely see the following files (default):
Open the file sendmail.ini – this is where all of your SMTP server configurations will go, for example: SMTP Username, Password, Host, Port, etc
GMail requires an SSL connection, so my config was setup to use SSL port 465 and smtp_ssl=auto. If SSL is not necessary for your SMTP server, simply set smtp_ssl=none.
Once the configuration is setup, make sure to save changes, then exit.
Now, everything on the sendmail’s end is setup – now we just need to let the server know its there!
Edit your PHP.ini file:
XAMPP installations often have multiple files. If you are doubtful of the correct one, you can always go through and change them all. But before you do that, change the php.ini in \xampp\apache\bin\.
Look for the following line:
sendmail_path = “C:\xampp\sendmail\sendmail.exe -t”
Uncomment the line (if already commented) by removing the semicolon at the start.
Ensure that the path to sendmail.exe is correct (this is correct for me).
Save and exit php.ini
Restart the apache server and everything should work!
Hope this helps you.