Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

arav99's Profile

GitHub User: arav99

Comments by

Avatar

Hello Friends i know i m new here but i m sharing an html email Composer with mysql database php code here and i hope this may be helpful for anyone

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "">http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

Compose HTML Email

<?php

$id=secureget('id');

$uinfo = mysql_query("SELECT * FROM mydata WHERE id=$id");
$guinfo = mysql_fetch_array($uinfo);
$uname = $guinfo['user'];
$email = $guinfo['email'];

if (isset($_REQUEST['subject'])&&(isset($_REQUEST['msg'])))
//if "email" is filled out, send email
{
//send email
$subject = $_REQUEST['subject'];
$team = $_REQUEST['team'];
$name = $_REQUEST['name'];
$foot = 'Best regards,Company '.$team.' '.$name.'
Support Email - email@email.com

Copyrights [c] 2015 Company
';
$to = ''.$email.'';
$mail = 'Company '.$team.'c@mail.com';

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Create email headers

$headers .= 'From: '.$mail."\r\n".
'Reply-To: '.$mail."\r\n" .
'X-Mailer: PHP/' . phpversion();
$headers .= 'BCC: ' . implode(', ', $recipients) . "\r\n";

$message1 = $_REQUEST['msg'];
$message .= ''.$message1.'
'.$foot.'';

$do = mail($to, $subject, $message, $headers);
if($do){
echo "Sent...";
}
else {
echo 'Failed!';
}
}

Read full Code and article here http://quickwebinfo.com/blog/2015/08/how-to-compose-a-html-email-using-mysql-database-php

Avatar

Hello Friends i know i m new here but i m sharing an html email Composer with mysql database php code here and i hope this may be helpful for anyone

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "">http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

Compose HTML Email

<?php

$id=secureget('id');

$uinfo = mysql_query("SELECT * FROM mydata WHERE id=$id");
$guinfo = mysql_fetch_array($uinfo);
$uname = $guinfo['user'];
$email = $guinfo['email'];

if (isset($_REQUEST['subject'])&&(isset($_REQUEST['msg'])))
//if "email" is filled out, send email
{
//send email
$subject = $_REQUEST['subject'];
$team = $_REQUEST['team'];
$name = $_REQUEST['name'];
$foot = 'Best regards,Company '.$team.' '.$name.'
Support Email - email@email.com

Copyrights [c] 2015 Company
';
$to = ''.$email.'';
$mail = 'Company '.$team.'c@mail.com';

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Create email headers

$headers .= 'From: '.$mail."\r\n".
'Reply-To: '.$mail."\r\n" .
'X-Mailer: PHP/' . phpversion();
$headers .= 'BCC: ' . implode(', ', $recipients) . "\r\n";

$message1 = $_REQUEST['msg'];
$message .= ''.$message1.'
'.$foot.'';

$do = mail($to, $subject, $message, $headers);
if($do){
echo "Sent...";
}
else {
echo 'Failed!';
}
}

Read full Code and article here http://quickwebinfo.com/blog/2015/08/how-to-compose-a-html-email-using-mysql-database-php