Languages :: Visual Basic :: Send HTML Email with embedded image using VB |
|||
| By: VB guy |
Date: 02/03/2003 00:00:00 |
Points: 75 | Status: Answered Quality : Excellent |
|
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. |
|||
| By: VGR | Date: 02/03/2003 08:26:00 | Type : Comment |
|
| 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 |
|||
| By: VB guy | Date: 02/03/2003 15:38:00 | Type : Comment |
|
| 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? |
|||
| By: VB guy | Date: 02/03/2003 17:42:00 | Type : Comment |
|
| 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? |
|||
| By: VGR | Date: 02/03/2003 18:16:00 | Type : Comment |
|
| 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 |
|||
| By: VB guy | Date: 02/03/2003 18:33:00 | Type : Comment |
|
| 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? |
|||
| By: VGR | Date: 03/03/2003 07:17:00 | Type : Answer |
|
| 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 <A HREF="http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20437974.html">http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20437974.html</a> 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]); |
|||
| By: collegeBoy | Date: 03/03/2003 07:34:00 | Type : Comment |
|
| 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... --collegeBoy |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








