Sending email in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hashmio9
Forum Newbie
Posts: 1
Joined: Wed Mar 30, 2005 3:10 am

Sending email in php

Post by hashmio9 »

Hi

I would like to know how I can send an email from my php code. I am aware there is a function called mail(), but there are no Username and Password settings. I am trying to use gmail as my SMTP. Can anyone help? I need to know how to configure for an external email server such as Gmail

Oz
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Gmail isn't an SMTP server, FYI. PHPmailer (SourceForge.net) has SMTP login linkage. I believe Pear's does as well. (pear.php.net)
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Generally mail() will not require a username or password to be specified directly from a host account. I suggest testing it in a small script or verifying it with your host.
Post Reply