Jump to content

Archived

This topic is now archived and is closed to further replies.

littledbc

mail() authentication problem

Recommended Posts

I get this error when trying to use the mail() function:
mail() [function.mail]: SMTP server response: 550 Relaying denied
Does anyone know how to authenticate to the SMTP server so I don't get this error?
Thanks!

Share this post


Link to post
Share on other sites
try this mate

[code]
<?php
ini_set("SMTP","mail.domain.com");
ini_set("sendmail_from","abc@example.com");
?>
[/code]

Share this post


Link to post
Share on other sites
If possible, make either the To: or the From: address be hosted on the mail server to satisfy relaying restrictions. If you are putting a user entered email address into the From: header, put it instead into the Reply-To: header and put a valid email address hosted on the mail server into the From: header.

The php mail() function does not support SMTP authentication. Use the phpmailer class instead.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.