?
Solved

Send HTML Email with embedded image using VB

Posted on 2003-03-02
9
Medium Priority
?
271 Views
Last Modified: 2010-04-17
I need to send HTML formatted mails from VB and it should not use any object of outlook2000 or outlook.The attached imgaes should get embedded as well.Can anyone help me for this.
I have seen many individual email clients that performs this function but i need to do it programmatically.
0
Comment
Question by:PrasadCG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 15

Expert Comment

by:VGR
ID: 8053428
programmatically, it doesn't change anything : you need a MAPI client and a MAPI server (the email SMTP client), or direct access to the SMTP server - feasible? -

I would say that ***obviously*** there are some security reasons supporting the need to "talk to" the MAPI "server", ie Outlook or OE or Eudora or Communicator etc

Anyway, if you are gifted in languages, I have this code in Delphi/ObjectPascal, in case you want to have a look at it for adaptation.
My program do use MAPI to send HTML/RTF/whatever emails, with attachments, but this goes through the email client. It's transparent with Outlook Express, but not with Eudora if properly configured :D :D :D
It will say "a program tries to send email behind your back, do you want to allow this ?" :D :D
0
 

Author Comment

by:PrasadCG
ID: 8055007
I have a code that sends HTMLformatted mails using outlook2000 object.But the requirement is I need to know how the attachement of images is doneto a message.if you see the html formatted meggsae you can see instead of image a 'cid' no.How this no is created?
0
 

Author Comment

by:PrasadCG
ID: 8055393
I have a code that sends HTMLformatted mails using outlook2000 object.But the requirement is I need to know how the attachement of images is doneto a message.if you see the html formatted meggsae you can see instead of image a 'cid' no.How this no is created?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Expert Comment

by:VGR
ID: 8055492
perhaps you are asked to MIME-Encode attachmets ? Then this is easy. Show me what you are supposed to generate, and what you have so far
0
 

Author Comment

by:PrasadCG
ID: 8055567
basically i have done it with outlook but now i want to do it without the help of outlook.Just an independent email sender.Yes i want to know how to mime encode.Can you tell me how its being done?
0
 
LVL 15

Accepted Solution

by:
VGR earned 300 total points
ID: 8055766
what do you mean by "with outlook" ? Using OLE Automation ?
as for me, I have a mail client so that the MAPI commands just go through him to the SMTP server (in Delphi). In PHP the mail() finction, if activated and peoperly configured in php.ini, works without any email client and without MAPI.
To create MIME-Attachments, you insert a separator, some specific codes etc. Look at http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20437974.html

my humble stuff allows you to add as many attachments as you want and does all the coding, by using a function like this :

function SendEmail($email,$titre,$corps,$attach = '') {
 GLOBAL $globEmail,$locServeur;
   CreateEmail("$email","$titre", "$corps"."\n\nsome extra text (signature) delimited by \n.");
   if ($attach<>'') AddAttachment($attach); // complete filename (repeat for each attachment)
   CloseAndSend();
}

if you have more than one attachment, just add parameters (or an array, because PHP arrays are open arrays) and repeat AddAttachment($attach[$i]);
0
 
LVL 2

Expert Comment

by:xyzzer
ID: 8055842
If You want to do it without Outlook or any other program - You can do it by the rfc-s documents. Use sockets to connect to the SMTP server, implement the SMTP client - server transaction by the RFC and add attachments using MIME and BASE64 encoding (RFCs again).
That may take some time to accomplish though...

--Filip
0
 

Expert Comment

by:CleanupPing
ID: 9447410
PrasadCG:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Make the most of your online learning experience.
Six Sigma Control Plans
Starting up a Project
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question