Allie1138 Posted December 23, 2007 Share Posted December 23, 2007 Hi All... Does anyone have a php form to send an email, but is it possible to have the email send a doc file... or a 'nicer looking' form instead of a text email? Any ideas or php to share? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/82941-form-to-send-an-email-ideas/ Share on other sites More sharing options...
shocker-z Posted December 23, 2007 Share Posted December 23, 2007 found this good exmaple from google This is using HTML instead of a word file as you cant send word files without it sending as an attachment and also if they didnt have word then they wouldnt be able to see it. <?php //change this to your email. $to = "m@maaking.com"; $from = "m2@maaking.com"; $subject = "Hello! This is HTML email"; //begin of HTML message $message = "<html> <body bgcolor=\"#DCEEFC\"> <center> <b>Looool!!! I am reciving HTML email......</b> <br> <font color=\"red\">Thanks Mohammed!</font> <br> <a href=\"http://www.maaking.com/\">* maaking.com</a> </center> <br><br>*** Now you Can send HTML Email <br> Regards<br>MOhammed Ahmed - Palestine </body> </html>"; //end of message // To send the HTML mail we need to set the Content-type header. $headers = "MIME-Version: 1.0rn"; $headers .= "Content-type: text/html; charset=iso-8859-1rn"; $headers .= "From: $from\r\n"; //options to send to cc+bcc //$headers .= "Cc: [email]maa@p-i-s.cXom[/email]"; //$headers .= "Bcc: [email]email@maaking.cXom[/email]"; // now lets send the email. mail($to, $subject, $message, $headers); echo "Message has been sent....!"; ?> I use a phpmailer class myself to enable me to add attachments as ive been developing corporate email applications recently. Regards Liam Quote Link to comment https://forums.phpfreaks.com/topic/82941-form-to-send-an-email-ideas/#findComment-421846 Share on other sites More sharing options...
Allie1138 Posted December 23, 2007 Author Share Posted December 23, 2007 oh wow! I'll have to look into this. Thank you! Now, will this email the form that the person just filled out? Quote Link to comment https://forums.phpfreaks.com/topic/82941-form-to-send-an-email-ideas/#findComment-421854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.