Jump to content

Emails


chestnuth

Recommended Posts

i am trying to send an email using PHP, i am using a wamp setup.

However i keep gettin errors, any ideas?

 

<?php

mail('[email protected]','hello','bodytext');

?>

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in

 

Thanks

 

J

Link to comment
https://forums.phpfreaks.com/topic/94742-emails/
Share on other sites

Pretty much just what it says. You have to go into your php.ini file and setup the smtp. Get setting from ISP and put them into the php.ini file

 

something like this

[mail function]

; For Win32 only.

SMTP = smarthost.coxmail.com

smtp_port = 25

sendmail_from = [email protected]

 

if your smtp server requires authentication you may want to download the phpmailer class. I downloaded it and put it in my includes folder under my php install and that makes it available for every script you write.

 

Ray

Link to comment
https://forums.phpfreaks.com/topic/94742-emails/#findComment-485086
Share on other sites

Archived

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

×
×
  • Create New...

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.