I want to send Email from my website. Here I have used form. How can I send email from this from field using PHP.
How can I send email with phpI want to send email from form field. How can I do that using PHP?
Page 1 of 1
2 Replies - 2323 Views - Last Post: 02 July 2008 - 11:06 AM
Replies To: How can I send email with php
#2
Re: How can I send email with php
Posted 02 July 2008 - 06:41 AM
Easily my friend.
Use/modify as needed
<?php $subject = $_POST['subject']; $to = $_POST['to']; $body = $_POST['body']; $from = "no-reply@mysite.com" // Optional $headers = "From: $from"; // Optional mail($to,$subject,$body,$headers);
Use/modify as needed
#3
Re: How can I send email with php
Posted 02 July 2008 - 11:06 AM
Good enough joey.
@Hijibiji - The method is different for sending HTML e-mails. You need to include some more information in your headers, such as the Content-Type. What joey has will be great for just plaintext e-mails.
@Hijibiji - The method is different for sending HTML e-mails. You need to include some more information in your headers, such as the Content-Type. What joey has will be great for just plaintext e-mails.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|