Jump to content

Recommended Posts

do you want to embed the image into the email or link it??

 

to link it, all you need to do is file_put_contents() to a lcation that is accessible to the web then link the image in the email "<img src='http://www.yourdomain.com/path/to/img' />"

 

Embedding the image increase bandwidth on the server especially if your sending loads of emails.

 

The best thing to do for embedding is take a look on www.phpclasses.org and find a mime email class, will make your life much easier

Yes I want to have the converted image (string) as an attachment. Do I have to add headders to do this. Could you please alter the code so it converts the string in to a image and sent as a attachment?

 

This is my current code.

 

<?PHP

$to = "[email protected]";

 

$subject = "heading";

$headers = "From:" .$email."\r\n";

$message = "Name: " . $thename;

$message .= "\nCompany : " . $thecompany;

 

$sentOk = mail("$to",$subject,$message,$headers);

 

echo "sentOk=" . $sentOk;

?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.