Jump to content

LeeAppleby

New Members
  • Posts

    4
  • Joined

  • Last visited

LeeAppleby's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yep your exactly right staring me right in the face . Thank you very much for taking the time to look and to reply with a solution. best regards Lee
  2. I get this at the bottom of the email in oulook --010103689954 Content-Type: text/plain; charset="iso-8859-1" Plain text version showing up here and should not should only be included if not supported html and it should not really show this should only show if I could not get the html version. so im trying to include two versions html and plain/text . hope that makes sense my heads been going in circles for days now lol. thanks for taking the time to look and help
  3. Hi it sends the html header and the attachment but for me it does not send the text/plain element of the email so it is only sending Content-Type: text/html; and also the attachment and not Content-Type: text/plain version. I thought perhaps I had a problem with bound. thanks for testing It Jazzman1
  4. hi all new to php and having a sturggle with email. I have a a form that when completed I wish to auto email the results to a new member simple enough . i also create a image with their unique name and member type and attach this to the email. I can attach the image and send an html email however I wish to send a plain text email along with this. here lies the problem. $to = $email ; $subject = 'some subject'; $bound_text = "010103689954"; $bound = "--".$bound_text."\r\n"; $bound_last = "--".$bound_text."--\r\n"; $headers = "From: <snip email removed>\r\n"; $headers .= "MIME-Version: 1.0\r\n" ."Content-Type: multipart/mixed; boundary=\"$bound_text\""; $message .= "If you can see this MIME than your client doesn't accept MIME types!\r\n" .$bound; /*HTML part of email*/ $message .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n"; $message .="Content-Transfer-Encoding: 7bit\r\n\r\n"; $message .='<html><b>html version</b></html>\r\n' .$bound; /*Plain Text part of email*/ $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $message .="Plain text version\r\n" .$bound; /*Attachment part of the email adds jpeg memebrship card*/ $file = file_get_contents("create_membership_card.php?forename=$Forename&surname=$Surname&membership=$Membership"); $message .= "Content-Type: image/jpg; name=\"YourMembershipCard.jpg\"\r\n" ."Content-Transfer-Encoding: base64\r\n" ."Content-disposition: attachment; file=\"YourMembershipCard.jpg\"\r\n" ."\r\n" .chunk_split(base64_encode($file)) .$bound_last; mail($to, $subject, $message, $headers) This will send email in html and attach image but I can not get it to also send the plain/test version. example page to enter email and see what is sent http://www.hexhamcanoeclub.co.uk/Hexham/index.php?page=Email Any help with this would be great thanks in advance hope I have provided enough information Lee ps. great place you have here
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.