Page 1 of 1

mail() problem on local server

Posted: Mon Jan 09, 2006 1:07 pm
by jayshields
Hi.

Ok, I have a little problem with mail(), and I have read every note on php.net to no avail.

This is the error I get:

Code: Select all

Warning: mail() [function.mail]: SMTP server response: 550 you are not allowed to send mail to <email@jay-designs.co.uk> in C:\Program Files\Apache Group\Apache2\htdocs\collegesite\contact.php on line 37
This is my mail() code:

Code: Select all

$body = "This is a message from $name1 using the Contact Form @ Jay's Photoshop Tutorials.\n";
		$body .= "\n";
		$body .= "----------\n";
		$body .= "\n";
		$body .= $message1;
		//Send the email
		mail ('email@jay-designs.co.uk', 'Message from PS Tutorials Contact Form', $body, 'From: ' . $email1 . "\n");
I've never had problems on paid for servers with this same syntax.

I'm guessing it must be a problem with my php.ini. Here are my current settings:

Code: Select all

SMTP = smtp.ntlworld.com
smtp_port = 25
I'm presuming the default smtp_port of 25 will be OK, and that I should be using my ISP's SMTP server instead of using my IP or localhost.

Does anyone know what's going wrong?

Thanks.

Posted: Tue Jan 10, 2006 4:37 am
by twigletmac
Do you have the sendmail_from address also set in the php.ini?

Although, I've got the same ISP as you and although I'm not getting any errors when I try and send e-mails via PHP I'm not receiving them back :?

Mac

Posted: Tue Jan 10, 2006 5:18 am
by jayshields
sendmail_from is commented out. Should I uncomment it and change it to my email address or something?

What settings have you used in yours?

Posted: Tue Jan 10, 2006 5:24 am
by twigletmac
I just uncommented it and set it to webmaster@mydomain.com - my guess would be that without it the mailserver rejects the e-mail.

Mac