Hi All,
I have code below that works perfectly. I would simply need to change the "FONT TYPE & FONT SIZE" of the body of the email body being sent.
Here is my code:
has_txt=.F.
LOCAL iMsg,iConf
DECLARE SHORT InternetGetConnectedState IN wininet.DLL;
INTEGER @lpdwFlags, INTEGER dwReserved
lConnect=displayState()
IF lConnect
iMsg = CREATEOBJECT("CDO.Message")
iConf = CREATEOBJECT("CDO.Configuration")
Flds = iConf.FIELDS
WITH Flds
.ITEM(" = jhjjj
.ITEM(" = jjjjjj
.ITEM(" = jjjjjjj
.UPDATE()
ENDWITH
WITH iMsg
.Configuration = iConf
.TO = me
.BCC = ""
.FROM = "yiu"
.Subject = "dfgfdsgsdfgdfsgsdg"
.FIELDS("Priority").VALUE = 0 && -1=Low, 0=Normal, 1=High
.FIELDS.UPDATE()
IF has_txt=.F. && HAS ONLY PDF (NO TXT FILE EXISTS)
bod="<img src='cid:logo.png'><BR>Bonjour / Hello,<BR><BR>Ci-joint votre facture électronique pour le mois courant en format PDF.<BR>"
bod=bod+"Si vous avez besoin d'une autre copie, il est également disponible en ligne.<BR>"
bod=bod+"Pour y accéder, s'il vous plaît pointer votre navigateur au: "
bod=bod+"<BR><BR>nom d'utilisateur / username: "+"<BR><BR><BR>Merci / Thank You<BR><BR><BR>"
.HTMLBody = "font size=10 face=verdana>"
.HtmlBody=bod
ENDIF
.AddAttachment ("C:\EBilling_Xtra\logo.png") && ALWAYS DONE SO THAT EVERYBODY HAS THE LOGO
.SEND()
ENDWITH
iMsg = .NULL.
iConf = .NULL.
Flds = .NULL.
ELSE
MESSAGEBOX("Could not send the message, your internet connection is down.")
ENDIF
PROCEDURE displayState
LOCAL lConnected
lConnected = .F.
lpdwFlags = 0
IF InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
ENDIF
RETURN lConnected
ENDPROC
The line:
.HTMLBody = "font size=10 face=verdana>"
is not working. How do I get the font size & style to make it so that the "body" of the email is in that font style and size??
Please let me know.
Thanks,
FOXUP!
I have code below that works perfectly. I would simply need to change the "FONT TYPE & FONT SIZE" of the body of the email body being sent.
Here is my code:
has_txt=.F.
LOCAL iMsg,iConf
DECLARE SHORT InternetGetConnectedState IN wininet.DLL;
INTEGER @lpdwFlags, INTEGER dwReserved
lConnect=displayState()
IF lConnect
iMsg = CREATEOBJECT("CDO.Message")
iConf = CREATEOBJECT("CDO.Configuration")
Flds = iConf.FIELDS
WITH Flds
.ITEM(" = jhjjj
.ITEM(" = jjjjjj
.ITEM(" = jjjjjjj
.UPDATE()
ENDWITH
WITH iMsg
.Configuration = iConf
.TO = me
.BCC = ""
.FROM = "yiu"
.Subject = "dfgfdsgsdfgdfsgsdg"
.FIELDS("Priority").VALUE = 0 && -1=Low, 0=Normal, 1=High
.FIELDS.UPDATE()
IF has_txt=.F. && HAS ONLY PDF (NO TXT FILE EXISTS)
bod="<img src='cid:logo.png'><BR>Bonjour / Hello,<BR><BR>Ci-joint votre facture électronique pour le mois courant en format PDF.<BR>"
bod=bod+"Si vous avez besoin d'une autre copie, il est également disponible en ligne.<BR>"
bod=bod+"Pour y accéder, s'il vous plaît pointer votre navigateur au: "
bod=bod+"<BR><BR>nom d'utilisateur / username: "+"<BR><BR><BR>Merci / Thank You<BR><BR><BR>"
.HTMLBody = "font size=10 face=verdana>"
.HtmlBody=bod
ENDIF
.AddAttachment ("C:\EBilling_Xtra\logo.png") && ALWAYS DONE SO THAT EVERYBODY HAS THE LOGO
.SEND()
ENDWITH
iMsg = .NULL.
iConf = .NULL.
Flds = .NULL.
ELSE
MESSAGEBOX("Could not send the message, your internet connection is down.")
ENDIF
PROCEDURE displayState
LOCAL lConnected
lConnected = .F.
lpdwFlags = 0
IF InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
ENDIF
RETURN lConnected
ENDPROC
The line:
.HTMLBody = "font size=10 face=verdana>"
is not working. How do I get the font size & style to make it so that the "body" of the email is in that font style and size??
Please let me know.
Thanks,
FOXUP!