Jump to content

Configuring PHP mail server?


Recommended Posts

Hi,

 

I am new to PHP. I use windows XP. I want to send a mail using PHP application to my gmail. I use broadband connection with a username and password.

 

What should i configure - Mail server or anything? I am not aware of the settings. Can anyone suggest and guide me through please ??

 

<?

 

$to = "[email protected]";

$subject = "Test mail";

$message = "Hello! This is a simple email message.";

$from = "[email protected]";

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail Sent.";

 

?>

 

I used this program. It shows message sent. But i dont find my mail in the inbox..

Link to comment
https://forums.phpfreaks.com/topic/172128-configuring-php-mail-server/
Share on other sites

You will not be able to use php's mail function. It cannot connect to a SMTP server that requires authentication as this cannot be set within your ini file. Since it is a local pc you have no mail transfer agent (mta). Download and use the swiftmailer libraries http://swiftmailer.org/ since you can configure a SMTP server. Read the docs on usage.

You will not be able to use php's mail function. It cannot connect to a SMTP server that requires authentication as this cannot be set within your ini file. Since it is a local pc you have no mail transfer agent (mta). Download and use the swiftmailer libraries http://swiftmailer.org/ since you can configure a SMTP server. Read the docs on usage.

 

Thank you...I tried using phpmailer yesterday..it worked..I will try this one now...

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.