Send HTML Email with embedded image using VB

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.
PrasadCGAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
VGRConnect With a Mentor Commented:
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
 
VGRCommented:
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
 
PrasadCGAuthor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
PrasadCGAuthor Commented:
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
 
VGRCommented:
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
 
PrasadCGAuthor Commented:
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
 
xyzzerCommented:
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
 
CleanupPingCommented:
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
All Courses

From novice to tech pro — start learning today.