Computing.Net > Forums > Programming > sending email in php

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sending email in php

Reply to Message Icon

Name: gang
Date: February 23, 2009 at 16:02:37 Pacific
OS: Windows XP
CPU/Ram: 512
Product: Amd / Sempron
Subcategory: Java
Comment:

how to send a email using php?Can I have a code for that please???lease this is for my thesis I want to pass this last trial



Sponsored Link
Ads by Google

Response Number 1
Name: shutat
Date: February 25, 2009 at 12:35:16 Pacific
Reply:

For basic email using php

<?php

$Name = "from"; 
$email = "from@somedomain"; 
$recipient = "to@somedomain"; 
$mail_body = "some text to send";
$subject = "mail subject line";
$header = "From: ". $Name . " <" . $email . ">\r\n";

ini_set('sendmail_from', 'from@somedomain'); // suggested by some php help sites

mail($recipient, $subject, $mail_body, $header);
?>

HTH


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: sending email in php

PHP: cant send emails using local smtp server www.computing.net/answers/programming/php-cant-send-emails-using-local-smtp-server/19586.html

send form to email in html format? www.computing.net/answers/programming/send-form-to-email-in-html-format/2102.html

batch to count files in DIR then send email www.computing.net/answers/programming/batch-to-count-files-in-dir-then-send-email/19628.html