Hi ,
I haven't send any multipart mime mail before and now when I try the following I don not get message body. Means message body of the mail comes out to be blank.
Please help me to understand the problem and please also tell the ways of correcting the things.
Regards,
Ranjan
$to = "ranjangoyal2004@yahoo.com";
$subject = "Test multipart mime mail";
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-Type: multipart/alternative; boundary=$mime_boundary';
$headers .= 'From: ranjan goyal' . "\r\n";
$message .= "
--{$mime_boundary}\n
Content-Type: text/plain; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit\n\n
Dear {FIRSTNAME},
We are just writing to remind you that your resume has been live on {SITE} for 30 days without being updated.
While this is not a problem, your resume has more chance of being seen if it is closer to the top of the list.
Sending your resume to the top of the list is easy! All you have to do is <U>log in</U> and click on the resume section, and then press save. You resume will then show as 'Updated Today' which will drastically increase the number of job offers you receive!
If you have already found employment, you can also de-activate your resume when you log in.
If you have any questions, please reply to this email!
The {SITE} team
--{$mime_boundary}\n
Content-Type: text/html; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit\n\n
<table>
<tr>
<td>
Dear {FIRSTNAME},
We are just writing to remind you that your resume has been live on {SITE} for 30 days without being updated.
While this is not a problem, your resume has more chance of being seen if it is closer to the top of the list.
Sending your resume to the top of the list is easy! All you have to do is <U>log in</U> and click on the resume section, and then press save. You resume will then show as 'Updated Today' which will drastically increase the number of job offers you receive!
If you have already found employment, you can also de-activate your resume when you log in.
If you have any questions, please reply to this email!
The {SITE} team
</td>
</tr>
</table>
--{$mime_boundary}--\n
";
mail($to,$subject,$message,$headers) or die("Mail could not be sent");