Link to home
Start Free TrialLog in
Avatar of sureshp
sureshp

asked on

Mail program needed

Welcome

Is it possible to send an html page with an embedded image using perl (support Outlook,Eudora etc)?
If possible please post a sample working code to solve this problem.
Long days back i had seen some code that handle this problem and the doc says that Outlook will support it and Eudora mail won't support.

Please post your answer as comment.

Thanks
Avatar of binkzz
binkzz

I believe this is the ticket: http://66.70.219.114/articles/perl/at0001.shtml

And don't you dare use it for spamming! :Þ


Mr B
MIME::Lite (which you can install with CPAN or PPM) claims to do what you're looking for.

http://www.zeegee.com/code/perl/MIME-Lite/docs/MIME/Lite.pm.html#Send_an_HTML_document_with_images_included
sureshp,

"..Is it possible to send an html page with an embedded image using perl (support Outlook,Eudora etc)?..."

Can you please define the etc?? The ability to handle & display HTML content in emails is more a function of the email client, than the program that generates the email.

So if you were to have a Perl script that would generate the email, it would work just fine. if that generated email were to be viewed in Eudora, Outlook, Hotmail, Yahoo, Netscape mail, it would look just great. However, if you were to view the same email in Pine or Elm then you would only see a string of characters.

In order for me to post the Perl code that you are looking for, here are some questions that i would like to ask.

* What operating system are you on?
* Do you have sendmail installed on your server?
if not, what email MTA are you using?
* Do you have the  CGI module?

Pl. let me know.

This will help me provide you with a more accurate answer, faster.
sureshp,

Did you get the solution you were looking for?

Pl. let me know.
Avatar of sureshp

ASKER

manesh,

"* What operating system are you on?" -- UNIX
"* Do you have sendmail installed on your server? " -- YES
* Do you have the  CGI module? " --YES

I need a simple example to solve this problem.

I am using this code for mail handling purpose.

Please provide a simple solution as early as possible.

I will not be here for 2 days.

Waiting for your comment.
Thanks
sureshp
Avatar of sureshp

ASKER

manesh,

"Can you please define the etc??"

I would like view in Eudora, Outlook, Hotmail and Yahoo.

Thanks for attending my question.

ASKER CERTIFIED SOLUTION
Avatar of maneshr
maneshr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sureshp

ASKER

manesh,

Thanks for your immediate reply.

"Looking forward to your quick reply on return"

It's not working properly.

I just cut your code and executed. The mail i viewed in Outlook Express 5.0(Win98) was not correct.,got html tags.

I would like to view the html page with an embedded image. Using your code, that will not work. (given : <img src="http://www.dfasdfsd.com/Embedded/19092828" border=0>").
If "dfasdfsd.com" is not connected we won't be able to view the image.
=================

Let me explain my problem first:

I have a site, in that i handled the incoming mails as follows: if someone send a mail(html format) with an embedded image will store the html part in the "MAIL"folder and embedded image in the "IMAGE" folder.
The image path in the html page will be (eg:http://www.dfasdfsd.com/Embedded/19092828) here "19092828" is embeded filename.If i click on the link(mail link in my site) to view the mail, it will open the mail and take the embedded image from
the embedded folder. (The same procedure is done in your code).
If i forward this mail to another mail id , he/she should view in the same format. How can i send that?(this type of path specifying http://www.dfasdfsd.com/Embedded/19092828 is not possible).
eg: Outlook handles like <img src=cid:059b01c18302$89b6db00$0b01a8c0@sureshp>[that's changes the path] and specifies in the Content-ID: <059b01c18302$89b6db00$0b01a8c0@sureshp> part.

Hope you got my question.
How can i solve this problem?
If you want to explain in detail, i can send it by mail(flow etc as a doc file).
Hope you can provide a best solution.
Thanks in advance.
Regards,
sureshp
Avatar of sureshp

ASKER

manesh,
I know the point 250 is not sufficient. I am adding +50 points.

Thanks
 
sureshp,

"..It's not working properly.

                     I just cut your code and executed. ..."

Did you test/see the email in Eudora, Hotmail & Yahoo!! email clients?

If yes, can you let me know if you could see the correct output?

i want to keep Outlook for the end.

Let me know.
Avatar of sureshp

ASKER

maneshr,

Tested in Eudora , its working properly.
If i am online i can see the image. <img src="http://www.dfasdfsd.com/valentine/$image" border=0>.

Embedded image path doesn't change(still my domain path).

I have a doubt:
If you have a html associated with an embedded image (in your server) and send this html pagee to your friend usind sendmail. Is he receives the same html page with embedded image.

Waiting for your reply.
Thanks


sureshp,

"..Tested in Eudora , its working properly...."

Just as i expected. What version of Outlook did you use?

"... Is he receives the same html page with embedded image. .."

Remember, the image is *not* embedded in the email. Only a link to the image is embedded in the email.
This is exactly how it should be.

So if you send anybody, including your friend, the email, the image will be shown (provided your server is up-and-running & the path to the image is correct).

Hope that helps.

Let me know if your original question was answered.
Please return and update/finalize all your open questions.  If you need our help, let us know.  If the questions remain unresolved next week, we will need to take the actions to close them.

Your cooperation in managing your questions at this site is not only appreciated but necessary.

Topic Area              URL              Date              
Community Support (General)   https://www.experts-exchange.com/jsp/qShow.jsp?ta=commspt&qid=20252119  01/06/02  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20069836  02/02/01  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20076966  02/13/01  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20227582  11/06/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=11326038  09/20/00  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20182722  09/13/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20182782  09/14/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20247168  12/18/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20247820  12/19/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20253473  01/10/02  

Moondancer
Community Support Moderator @ Experts Exchange
It is my opinion that Manesh more than earned these points and will close this today and award it.  You stated you would return in 2 days, that never happened.

I suggest that you, sureshp, open another question to request further guidance on add-on questions not directly related to issue.  If, however, you do return here with additional needs directly related to this question, I am confident that Manesh will return and collaborate further.

As regards your other open questions noted above, I have taken actions and commented in them all.  Where no help was provided, I refunded your points and closed them.

Thank you,

Moondancer
Community Support Moderator @ Experts Exchange
Moondancer,

"..It is my opinion that Manesh more than earned these points and will close this today and award it.  .."

Thanks for awarding the points.
Avatar of sureshp

ASKER

maneshr,

I couldn't response your comments intime because i met with an accident and was hospitalised.

Anyway Community Support Moderator @ Experts Exchange given you the credit, still i am ready to give points to this question because i didn't get any solution.

Manesh, is it possible to send an embedded image with a mail (using perl)?
WHEN i send a mail with an embedded image from my machine(using Outlook) to yahoo site , i can view it properly.
The same, can we handle using perl?
If possible i will post it as a new question.

Regards
sureshp.
Avatar of sureshp

ASKER

Moondancer,

"As regards your other open questions noted above, I have taken actions and commented in them all.  Where
no help was provided, I refunded your points and closed them."

I don't like to refund this point, fault is mine... i couldn't response to manesh's comment due to domestic problems.

Hope manesh may give a positive answer to my question(can be done or can't).
Sorry.

I am sure,I didn't close any questions unnecessarily. I didn't specify the reason while closing a question (This is my mistake).

Regards
sureshp.

Hi, sureshp.... all is well, thank you for returning and maintaining the questions you've asked.
Moondancer - EE Moderator
Hey ho sureshp,

If you're trying to send the images as separate files along with the e-mail containing the HTML, all you'll need to do is uuencode them and attach them like any other separate attachment (appending the uuencoded version to the end of the mailfile, or printing the uuencoded version to your MAIL outingness).

Mr B