Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

41 users online



Formmail Images

Formmail Images

Currently viewing this thread: 1 (0 members and 1 guests)


AndyDK

AndyDK

Status: Offline!

Formmail Images

You know how some emails you recieve have html in them and images show up?

I have a formmail script which works fine, it used for an ecard script and works really well, the only thing is, when the form is sent and formmail.php sends it, it displays <img src=images/ecard/userschoice.gif> instead of the image

Can this be fixed? like a variable to turn images on or something?? thanks,
Andy,

angelessme

angelessme

Neversidian
Status: Offline!

I think you have to set an email header for it to send as a html file or something.

-edit-
from the php manual

PHP:


<?php
/* recipients */
$to  "Mary <mary@example.com>" ", " // note the comma
$to .= "Kelly <kelly@example.com>";

/* subject */
$subject "Birthday Reminders for August";

/* message */
$message '
<html>bla bla</html>
'
;

/* To send HTML mail, you can set the Content-type header. */
$headers  "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";

$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";

/* and now mail it */
mail($to$subject$message$headers);
?>

___________________

angelessme, antagonising neverside members, staff and administration since 2001.

AndyDK

AndyDK

Status: Offline!

hmm didn't work, any other suggestions?

angelessme

angelessme

Neversidian
Status: Offline!

Are you sure the user end can recieve html emails?

Some free mail servers dont allow it. Also, the image path must be abosolute. so http://www.blablalb/imagepath.gif or whatever.

___________________

angelessme, antagonising neverside members, staff and administration since 2001.

AndyDK

AndyDK

Status: Offline!

Well I've tried on outlook and hotmail, and Im sure they can. Yes, the image is set to full path.

Thanks again for your help Smile

CDude

CDude

nothing
Status: Offline!

this works for me

PHP:


<?php
$to 
'my address@hotmail.com';
$subject 'Testing images';
$message '<img src="http://www3.google.com/images/logo.gif" />';
$header "Content-Type: text/html\r\n";

if ( 
mail $to$subject$message$header ) )
{
    print 
'Sent';
}
else
{
    print 
'Not sent';
}
?>

___________________

http://celerondude.com

AndyDK

AndyDK

Status: Offline!

Thanks, works great Smile

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.018 seconds.