Image link in an email from php

Reply

Join Date: Nov 2006
Posts: 5
Reputation: fixyourdns is an unknown quantity at this point 
Solved Threads: 0
fixyourdns fixyourdns is offline Offline
Newbie Poster

Image link in an email from php

 
0
  #1
Nov 27th, 2006
Hello all and thanks in advance, I am attempting to add an image in an email that is generated from php.
Here is the php code
  1. $ttext = "
  2. Hello,
  3.  
  4. $_POST[name], whose email address is $_POST[email] thought you may be interested in this event.
  5.  
  6. $_POST[refurl]
  7. $_POST[name] Has left you a personal note.
  8. $_POST[note]
  9.  
  10. $_POST[name] sent this information from www.communitychapel.net.
  11.  
  12. <img>http://www.communitychapel.net/assets/Map.jpg</img>
  13.  
  14. We look forward to your visit!
  15.  
  16. ";
the email shows the html code fro the link,
thanks again
remember the Monkey
www.gonehomenow.com
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 54
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

Re: Image link in an email from php

 
0
  #2
Nov 28th, 2006
Hi,

<img>http://www.communitychapel.net/assets/Map.jpg</img>

You doesnt try like the above code for image tag during mail send.

Please try like this below..

<img src="www.communitychapel.net/assets/Map.jpg " ></img>

May its helpful for you..
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 5
Reputation: fixyourdns is an unknown quantity at this point 
Solved Threads: 0
fixyourdns fixyourdns is offline Offline
Newbie Poster

Re: Image link in an email from php

 
0
  #3
Nov 30th, 2006
Thank you testing now
remember the Monkey
www.gonehomenow.com
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 5
Reputation: fixyourdns is an unknown quantity at this point 
Solved Threads: 0
fixyourdns fixyourdns is offline Offline
Newbie Poster

Re: Image link in an email from php

 
0
  #4
Dec 1st, 2006
Testing failed tryed...
<img src="www.communitychapel.net/assets/Map.jpg " ></img>
<img src="www.communitychapel.net/assets/Map.jpg " >
PRINT
<img src='www.communitychapel.net/assets/Map.jpg'>
Maybe I need to attach the image, Thanks for the help
remember the Monkey
www.gonehomenow.com
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 54
Reputation: mahe4us is an unknown quantity at this point 
Solved Threads: 0
mahe4us's Avatar
mahe4us mahe4us is offline Offline
Junior Poster in Training

Re: Image link in an email from php

 
0
  #5
Dec 1st, 2006
Hi,

I think you are using the above code in message section of mail function. for example

mail($to, $subject, $message, $headers);

I think you assign the image tags and other kind of information in the $message variable. Then you finally send mail to endusers. If you did like that then you will be in need of use some quotes format in $message variable. Here below I sent the sample code to send mail with picture. Please refer it...Also you use the table as you wish. otherwise you just enter the image tag in the quoted string like below.

//sample coe
<?
$message = '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<body>
<table width="780" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="72">&nbsp;</td>
<td width="626" height="51"><img src="www.communitychapel.net/assets/Map.jpg " ><" width="235" height="51"></td>
<td width="74">&nbsp;</td>
</tr>
</table>
</body>
</html>';
?>
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Image link in an email from php

 
0
  #6
Dec 1st, 2006
make sure the mail's Content-Type header is text/html:

i.e:

$headers = "Content-type:text/html";
mail($to, $subject, $message, $headers);
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: Image link in an email from php

 
0
  #7
Dec 2nd, 2006
Some email providers (optionally) block external images, so sending an external image by email may not work.
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC