To send email with image

Post Reply
Kleyton
Posts: 49
Joined: Thu Dec 22, 2005 12:50 pm

To send email with image

Post by Kleyton »

it has as to below insert image in the sending of email in the example?

#include "fivewin.ch"
****************
FUNCTION SendMail
*****************
LOCAL oOutLook,oMailItem,oRecip,oAttach

oOutLook := TOleAuto():New("Outlook.Application")

oMailItem := oOutLook:Invoke("CreateItem", 0)

oRecip := oMailItem:Invoke("Recipients")
oRecip:Invoke("Add", "lara.softhouse@gmail.com")
oRecip:Invoke("Add", "cleiton.softhouse@bol.com.br")

oMailItem:Set("Subject", "Testing e-mail via ole fw")

oMailItem:Set("Body", "Assunto, referente fatura 0001 no valor de "+CRLF+ ;
"R$ 1.500,00"+CRLF+CRLF+"Tudo Informática"+CRLF)

oAttach := oMailItem:Invoke("Attachments")
oAttach:Invoke("Add", "c:\autoexec.bat")
oAttach:Invoke("Add", "c:\config.sys")

oMailItem:Invoke("Send")

oRecip:End()
oAttach:End()
oMailItem:End()
oOutLook:End()

MsgInfo("Mensagem enviado com sucesso !")

RETURN NIL
Kleyton
Fwh906
Brazil
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Kleyton,

Code: Select all

oMailItem:Set( "HTMLBody", '<HTML><HEAD></HEAD><BODY><img src="http://www.fivetechsoft.com/images/logo5t2.gif"</BODY></HTML>' )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Kleyton
Posts: 49
Joined: Thu Dec 22, 2005 12:50 pm

Post by Kleyton »

Antonio Linares, Debtor for the aid, but did not give certain, did not insert the image in the body of the email.

He has as to use this process of sending of email for the OutlookExpress?
Kleyton
Fwh906
Brazil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Kleyton,

You cannot use OLE with Outlook Express, but you can use FW's TMail class. See my reponse to your message in the FWH section.

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Kleyton,

Here it works fine with Outlook 2003 (not Outlook Express).
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply