~n[EO]n~ Posted November 4, 2007 Share Posted November 4, 2007 Hi all, I had made HTML mail, it is working fine the mail gets received, but when I open the mail in Yahoo and Hotmail, images are missing and CSS also doesn't load. do you guys have any idea, why the images and css is not loading ??? Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 4, 2007 Author Share Posted November 4, 2007 'bump' -ed Quote Link to comment Share on other sites More sharing options...
bwochinski Posted November 4, 2007 Share Posted November 4, 2007 Can you paste the HTML? Or if it's long, just the relevant tags would be good. Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 4, 2007 Author Share Posted November 4, 2007 Ok, Here it is <?php $to=$_REQUEST['mem_email']; // subject $title="Your Registration Information"; $mail=new PHPMailer; // here is the message part with the design // it has all the images in the td, table etc... // it is too long so i didn't keep here only some portions $message = '<table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <td width="900" height="481" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="900" height="256" align="center" valign="top"><img src="images/mail_big.jpg" width="494" height="481" /></td> </tr> </table> </td> '; // header for html $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $success=$mail->sendmail($to,$title,$message,$headers); ?> That's all , the mail gets send but the images are not coming... Thanks... Quote Link to comment Share on other sites More sharing options...
bwochinski Posted November 4, 2007 Share Posted November 4, 2007 Well, I don't seen any CSS referenced there, but the problem with your images is that you have to use full pathnames, relative pathnames wont work if the page isn't being browsed from your server. <img src="http://www.yoursite.com/images/mail_big.jpg" width="494" height="481" /> Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 4, 2007 Author Share Posted November 4, 2007 Ok, thanks I will try. Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 5, 2007 Author Share Posted November 5, 2007 Well, the images part worked, but CSS is not loading how to make the CSS appear too... I added this line in message part $message = '<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="http://www.mysite.com/css/hello.css" rel="stylesheet" type="text/css" /> </head> <table width="980" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> Will this work ??? Thanks. Quote Link to comment 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.