Steve-vfp9user
Programmer
Hi
I'm using VFP9 SP2
I have had much success in sending automated emails from VFP9 but have a small issue trying to insert a jpg image as a logo which is stored on our website server.
The code below was used for the exception of the line stored to mbody2 which I have added.
When I send the email as above, I use the following:
Everything still works except the image I am trying to show in the body of the email is shown as:
I have researched several different options but I keep getting the same result. Here is the line of code I used for the above:
lcHtmlBody = [<html><body>Embedded Image:<br><img src="]
Any ideas please guys?
Thank you
Steve
I'm using VFP9 SP2
I have had much success in sending automated emails from VFP9 but have a small issue trying to insert a jpg image as a logo which is stored on our website server.
The code below was used for the exception of the line stored to mbody2 which I have added.
Code:
STORE "Dear "+ALLTRIM(COVERTITLE)+CHR(10)+CHR(10)+ ;
"Please find attached cover letter and quotation for your attention."+CHR(10)+CHR(10)+ ;
"We look forward to hearing from you."+CHR(10)+CHR(10)+ ;
"Regards"+CHR(10)+CHR(10)+CHR(10)+ ;
PROPER(ALLTRIM(FORENAME))+" "+PROPER(ALLTRIM(SURNAME))+CHR(10) TO mbody1
STORE lcHtmlBody+CHR(10) TO mbody2
STORE "My business, my address, my postcode"+CHR(10)+ ;
"Web: [URL unfurl="true"]www.mywebsitename.com"+CHR(10)+[/URL] ;
"Tel: 012 3456 7890 Ext "+ALLTRIM(TELEXT)+" - Fax: 012 3456 7891"+CHR(10) TO mbody3
When I send the email as above, I use the following:
Code:
oOutlook = Createobject('Outlook.Application')
oNameSpace = oOutlook.getnamespace('MAPI')
oOutbox = oNameSpace.GetDefaultFolder(4)
oItems = oOutbox.Items
oMailItem = oItems.Add(0)
oMailItem.To = EMAILADD
oMailItem.Subject = TRIM(msubject)
oMailItem.Body = TRIM(mbody1)+TRIM(mbody2)+TRIM(mbody3)
oMailItem.attachments.add(mcover)
oMailItem.attachments.add(mprop)
oMailItem.ReadReceiptRequested = .T.
oMailItem.Send
Everything still works except the image I am trying to show in the body of the email is shown as:
Code:
<html>[URL unfurl="true"]http://ourwebsite.com/logo/mylogo.jpg</html>[/URL]
I have researched several different options but I keep getting the same result. Here is the line of code I used for the above:
lcHtmlBody = [<html><body>Embedded Image:<br><img src="]
Any ideas please guys?
Thank you
Steve