| | |
Image link in an email from php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2006
Posts: 5
Reputation:
Solved Threads: 0
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 the email shows the html code fro the link,
thanks again
Here is the php code
php Syntax (Toggle Plain Text)
$ttext = " Hello, $_POST[name], whose email address is $_POST[email] thought you may be interested in this event. $_POST[refurl] $_POST[name] Has left you a personal note. $_POST[note] $_POST[name] sent this information from www.communitychapel.net. <img>http://www.communitychapel.net/assets/Map.jpg</img> We look forward to your visit! ";
thanks again
remember the Monkey
www.gonehomenow.com
www.gonehomenow.com
•
•
Join Date: Nov 2006
Posts: 5
Reputation:
Solved Threads: 0
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
<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
www.gonehomenow.com
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"> </td>
<td width="626" height="51"><img src="www.communitychapel.net/assets/Map.jpg " ><" width="235" height="51"></td>
<td width="74"> </td>
</tr>
</table>
</body>
</html>';
?>
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"> </td>
<td width="626" height="51"><img src="www.communitychapel.net/assets/Map.jpg " ><" width="235" height="51"></td>
<td width="74"> </td>
</tr>
</table>
</body>
</html>';
?>
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
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.
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.
![]() |
Similar Threads
- image with link in menu for e107 (PHP)
- how to display an attached image file in email (ASP)
- Random text display with image, link (PHP)
Other Threads in the PHP Forum
- Previous Thread: is there something wrong with my SQL statement?
- Next Thread: Repeat text from somewhere else in a document without actually writing it!
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube






