Jump to content

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 = "aaaaaa@gmail.com";

$subject = "Test mail";

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

$from = "nnnnnn@gmail.com";

$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...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.