Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

html formatted emails

Posted on 2003-12-09
9
Medium Priority
?
246 Views
Last Modified: 2008-03-06
hello,
i am having diffuculty sending html formatted emails, The content of the email comes from a html form, I paste in the enitire code for a webpage, chnage all " to ' and write the full path name to the images on my server
( eg. <img src='http://www.websit.com/images/imagename.jpg'> )

whats happening is the the images are not displaying, and all the html formatting is messed up... this is my code

$msg = "$message\n";

$to = "$email";
$subject = "Newsletter";

$mailheaders = "From: jblayney@jrbgraphicdesign.com\n";
$mailheaders .= "Reply-To: jblayney@jrbgraphicdesign.com";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=iso-2022-jp\r\n";

mail($to,$subject,$msg,$mailheaders);


seemd weird, i though this code used to work, I've used it on other servers..

justin
0
Comment
Question by:jblayney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 6

Expert Comment

by:aolXFT
ID: 9907603
$mailheaders = "From: jblayney@jrbgraphicdesign.com\n";
$mailheaders .= "Reply-To: jblayney@jrbgraphicdesign.com";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=iso-2022-jp\r\n";

I think you probably have a typo. Aren't headers supposed to be seperated by \r\n(no matter what OS you are using), Shouldn't there also be a newline, after the Reply-To header?
0
 
LVL 1

Author Comment

by:jblayney
ID: 9907674
tx,
didnt help at all, the emails i am testing with are outlook express for macintosh,, yahoo and hotmail wont even receive the email
0
 
LVL 1

Author Comment

by:jblayney
ID: 9907736
ok,
i just doscovered something, if i hard code the image into the message

$msg = "$message\n";
$msg .= "<img src ='whatever'>";

it works, but not if i send it from the form, the images are going to change, so i need them to come from the form, as well as links
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:jblayney
ID: 9907842
i have a thought.....(sometimes happens)

$message is coming directly from the form into the $msg, should I catch it first and convert it to a usable form...
0
 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 9912375
take a look a http:\\www.printer-friendly.com the program can send html emails.
0
 
LVL 6

Expert Comment

by:aolXFT
ID: 9912753
There must be something wrong with the html in your message if this is happening. Try echoing it out to debug it.
0
 
LVL 1

Accepted Solution

by:
jblayney earned 0 total points
ID: 9912855
actaully i fugured it out.. i had to add stripslashes funstion to receive it properly... tx for the help
0
 
LVL 2

Expert Comment

by:mbeckman
ID: 9947057
Plz close the question since you've discovered your answer. Thx.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question