By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

Newsletters

100+
P: 190
How to send html newsletters containig images in email
Jan 30 '08 #1
Share this Question
Share on Google+
30 Replies


harshmaul
Expert 100+
P: 490
Hi,
Firstly skim through this...
Standards for HTML Emails
Then... use something like lotus notes or any other email software capapble of sending html e-mails.
Jan 30 '08 #2

P: 50
How to send html newsletters containig images in email
To create an HTML newsletter you simply create a web page and then upload the code from that page to your distribution service.

set the header

$headers = "From: $from\r\n";
$headers .= "Content-type: text/html";
and use the mail function
mail($to, $subject, $message, $headers);

set the image path in the <image> tag in HTML template.

also u can use the web based free HTML editor to create the HTML template like TINY MCE,FCK Edotor .

Thanks,
Sandeep Agarwal
Jan 30 '08 #3

100+
P: 190
what is distribution service ?
Feb 1 '08 #4

harshmaul
Expert 100+
P: 490
hi,
One of the complications is that you are in the html forums. If you have created the template you will need to find a service provider that allows you to send html emails...

http://www.feedblitz.com/

That is quite a popular one in the US, but if you google the term "html email distribution" and search you country you can find one that more suits your needs.

The code that the other posted will work fine providing you use HTML on a server somewhere, so if you have access to a PHP server and know someone who can, you cans set that up for your self.
Feb 1 '08 #5

100+
P: 190
I have written following script

<?
$headers = "From:$from\r\n";
$headers .= "Content-type: text/html";
$from = "xyz@yahoo.com";
$to = "hij@yahoo.com";
$subject = "Test mail";
$message = "<html><font color='blue'> Hello! This is a simple email message.</font>";
$message .= "<img src='http://www.zyz.com/demo/try.gif'></html>";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

?>


but i am not getting image in my newsletter can yu explain why ?
Feb 1 '08 #6

drhowarddrfine
Expert 5K+
P: 7,435
Please note that you should not assume anyone is using the programming language/script you are showing. Do not assume anyone can, or is willing to, use the software you are showing. You should not assume the user is even using Windows or any Microsoft software. In the posts above, I would not be able to do any of the offered solutions.
Feb 1 '08 #7

P: 50
I have written following script

<?
$headers = "From:$from\r\n";
$headers .= "Content-type: text/html";
$from = "xyz@yahoo.com";
$to = "hij@yahoo.com";
$subject = "Test mail";
$message = "<html><font color='blue'> Hello! This is a simple email message.</font>";
$message .= "<img src='http://www.zyz.com/demo/try.gif'></html>";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

?>


but i am not getting image in my newsletter can yu explain why ?
This code is correct and must be display image .but display image setting depend on the mail server if u used the outlook them set the download image or u are checking in gmail also set the display image ..

or u can test this right click the not displayed image and download this image so u can see this image.
otherwise may be ur image file path error.Right click the not displayed image icon and see the properties and copy the usr and paste in web browser then if display the image then ur path is correct otherwise path is not correct .


Regards,
Sandeep Agarwal
Feb 1 '08 #8

100+
P: 190
i did not got ur idea of assuming or not assuming . I am so sorry for giving u a troble of being more clearer about this as need to develop this tech for using in my company and want to learn the best method





regards

Shalini
Feb 1 '08 #9

P: 50
Can u give me more detail about this problem i think ur problem is mailing function....

Ragards,
Sandeep Agarwal


i did not got ur idea of assuming or not assuming . I am so sorry for giving u a troble of being more clearer about this as need to develop this tech for using in my company and want to learn the best method





regards

Shalini
Feb 1 '08 #10

harshmaul
Expert 100+
P: 490
Hi,

Are you running this on a server that has PHP installed?
Feb 1 '08 #11

100+
P: 190
thanks i have got it but is it specific to anything ....
Feb 2 '08 #12

100+
P: 190
So what is the other best possible way which is compatible to every thing kindly tell me ....
Feb 2 '08 #13

harshmaul
Expert 100+
P: 490
Hi,
I do want to help you.
But lets start again.
So you have a html email that has already been written, and you would like to send it to multiple recipients. What do you want to email it from?
eg. do you have hotmail, gmail, outlook, thunderbird or any other.
Feb 2 '08 #14

100+
P: 190
Ok the confusion is here .....

I am a trainee webdesigner and i have a knowledge of PHP many clients for my company ask for newsletters so i wanted to learn , so solution given by sandeep worked for me .... The only thing is i am not getting flash movies linked with that...

And one more thing i wanted to know is that do newsletter improve our page ranking or hits ?

because ultimatly data is being fetched from our site only.......

And for awareness i would like to know how i can make a newsletter in hotmail, gmail, outlook, thunderbird or any other also..


regard
shalini
Feb 3 '08 #15

harshmaul
Expert 100+
P: 490
Hi Shalini,
Okay i hope this will do until i get to work tomorow.

You can kindof send HTML emails with hotmail like this...

Create the HTML, open up the html file in a browser copy the whole thing using ctrl+A, and then paste it in to the hotmail input box making sure the input type is set to rich text.

I seem to remember in outlook using the "import template" option in the file menu, and then importing a html file.

Finally if you want to personalise it per user u are better off using php running off your server.

Let me know how u get on...
Feb 3 '08 #16

100+
P: 190
i tried using horde but image comes at attachment not as a part of contents o newsletter
Feb 4 '08 #17

harshmaul
Expert 100+
P: 490
could you post a postion of your markup....
Are your images absolutely referenced?

eg... http://www.thescripts.com/images/image1.gif
and not /images/image1.gif
Feb 4 '08 #18

100+
P: 190
I am putting address like that only but if i am writing contents in a table and there i am putting it its not coming at the place where it should come and coming out of table below contents as an attachment .


And next problem is that i have made an image and i am trying to put some hyperlinks on it using imagemap ......how can i do that ? how to send image containg imagemap
Feb 4 '08 #19

P: 50
I am putting address like that only but if i am writing contents in a table and there i am putting it its not coming at the place where it should come and coming out of table below contents as an attachment .


And next problem is that i have made an image and i am trying to put some hyperlinks on it using imagemap ......how can i do that ? how to send image containg imagemap
Can u check email on different email clients check on differnrt email sites may be this prob is any specifice email sites..

Use the dreamweaver design view for imagemap... Craete the some hotspots points and them set the hyperlink of these point.some email site support the Image map but not all.. like Gmail—a very popular email client—doesn’t support them consistently

thanks,
Sandeep Agarwal
Feb 4 '08 #20

100+
P: 190
I tried it in yahoo but was not working but yes i sent newsletter using Horde
Is it because that ?

because in PHP i know it is going to worki ....






shalini
Feb 4 '08 #21

P: 50
Can u send the file so i think find out the problem....
Feb 4 '08 #22

100+
P: 190
<?

$from = "xyz@yahoo.com";
$to = "hij@yahoo.com";
$headers = "From:$from\r\n";
$headers .= "Content-type: text/html";
$subject = "Test mail";

$message = "<html><head></head><body bgcolor='maroon' text='white'> <font face='comic sans ms' color='white'>";

(Here the bgcolor and text is not working)

$message .= "<Left>Dear Mam and Sir <br><br>This Is for You .....<br><br></br>";

$message .= "<a href='http://www.himj.biz'><img src='http://www.himj.biz/demo/bike.gif'></a>";

$message .= "<br><br><form><input type='text' name='nm'><input type='button' name='nm' onclick=\"alert('hello')\"></form>";

$message .= "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ";
$message .= "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
$message .= " WIDTH='550' HEIGHT='400' id='myMovieName'><PARAM NAME=movie VALUE='http://himj.biz/demo/flashtrial.swf'>";
$message .= "<PARAM NAME=quality VALUE=high>";
$message .= "<PARAM NAME=bgcolor VALUE=#FFFFFF>";
$message .= "<EMBED src='http://himj.biz/demo/flashtrial.swf' quality=high ";
$message .= "bgcolor=#FFFFFF WIDTH='550' HEIGHT='400'
NAME='http://www.himj.biz/demo/flashtrial.swf' ALIGN='' ";
$message .= " TYPE='application/x-shockwave-flash'";
$message .= "PLUGINSPAGE= http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>";


(I am not getting this flash movie)

$message .= "<right> <br><br>With Lots Of Best Wishes </right></font></body></html>";

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

echo 'Mail Sent.';

?>
Feb 5 '08 #23

100+
P: 190
using php i can make an image map but using Horde i was unable to make image map can you suggest on this ?
Feb 5 '08 #24

P: 50
[quote=Shalini Bhalla]<?

$from = "xyz@yahoo.com";
$to = "hij@yahoo.com";
$headers = "From:$from\r\n";
$headers .= "Content-type: text/html";
$subject = "Test mail";

$message = "<html><head></head><body bgcolor='maroon' text='white'> <font face='comic sans ms' color='white'>";

(Here the bgcolor and text is not working)


In this case should be work but text is not working because you are using font attribute so text color is no effective



(I am not getting this flash movie)

ok i will see this issue and back to you with solution.
Feb 5 '08 #25

100+
P: 190
One More thing If I try to fwd it image is not going with it
Feb 6 '08 #26

P: 50
u want to sent image in attachment or web page ????


One More thing If I try to fwd it image is not going with it
Feb 6 '08 #27

100+
P: 190
what i want is that there should be an html page which i shoul be able to email and on which there shoud be some images or text which is hyper linked and if i send it to a particular person he should be able to forward it. not the link , but the the whole page.
Feb 6 '08 #28

P: 50
Hi,
I am bit confused that what do u want ??

can u send the full scenario in details.i am not understanding ur problem send me a full description to the problem..

Regards,
Sandeep Agrawal
Feb 6 '08 #29

100+
P: 190
<?

$from = "hijk@yahoo.com";
$to = "abcd@yahoo.com";
$headers = "From:$from\r\n";
$headers .= "Content-type: multipart/alternative";
$subject = "Three Pillar Technologies Pvt Ltd ";
$message = "<html><head></head><body>";
$message .= "<img src='http://www.mydomain.biz/demo/newsletter.gif' usemap='#Map'>";
$message .= "<map name='Map' id='Map'><area shape='rect' coords='123,306,215,326' href='http://www.mydomain.biz' ";
$message .= "target='self' alt='mydomain.biz' />";
$message .= "<area shape='rect' coords='126,332,220,348' href='http://www.mydomain.biz' alt='mydomain.biz' />";
$message .= "<area shape='rect' coords='127,353,220,372' href='http://www.mydomain.biz' alt='mydomain.biz' />";
$message .= "<area shape='rect' coords='128,375,221,395' href='http://www.mydomain.biz' alt='mydomain.biz' />";
$message .= "<area shape='rect' coords='22,7,115,97' href='http://www.mydomain.biz' target='_self'";
$message .= "alt='mydomain.biz' />";
$message .= "<area shape='rect' coords='283,15,583,41' href='http://www.mydomain.biz' target='_self' alt='mydomain.biz' />";
$message .= "</map>";


mail($to,$subject,$message,$headers);
echo 'Mail Sent.';

?>




This is the thing Exacly i want to do an i hae got 90% success in this but when a particular user will get this page and he wants to forward it , it doesn't get fwd properly.I want that what ever i email should be able to fwd it and it shoud get fwd as it is
Feb 7 '08 #30

100+
P: 190
how to use image map option when sending image using horde
Feb 9 '08 #31

Post your reply

Sign in to post your reply or Sign up for a free account.