Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Graphics in Emails
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01456511
Message ID:
01457107
Views:
49
Hi Colin

I know you use easymail

One way is to create an html file with you message with your local images then load that into your mail body like below
that will pull the image in and it is part of the email message. You might want to set an alternate bodytext as well to allow for users who are not allowing html email.

Store "nick.mason@btinternet.com" To strto
strsubject = "IMAGE TEST"
Store "xxxxxxx" To strfrom
Store "xxxxxxx" To strserver

smtp=Createobject("EasyMail.SMTP.5")
smtp.Reset
smtp.mailserver=strserver
smtp.FromAddr=strfrom

smtp.addrecipient("",Strto,1)
smtp.subject=strsubject
smtp.ESMTP_AuthMode =1
smtp.ESMTP_Account = "xxxxx"
smtp.ESMTP_Password = "xxxx"
strHeaders = "Content-Type:text/plain"
SMTP.BodyFormat = 1
ret = smtp.ImportBodyTextEx("c:\test\test.htm", 2 + 4)
If Not ret = 0
WAIT window "Error importing File "
endif

smtp.licensekey="xxxxxxxxxxxxxx"
qqax=smtp.Send()

Release smtp


>Robin
>
>I would be surprised if this were possible - I've done a lot of work with one of my Clients - sending embedded HTML images from VFP - after much research we arrived at the solution you are currently using
>
>If there is a way Clients can inject their own graphics into the process I would love to know it
>
>Colin
>
>>Thanks Nick, this looks just what I was looking for.
>>
>>I'll give it a go & let you know how it turns out.
>>
>>>I was interested Robin and I found this
>>>
>>>http://www.foxite.com/archives/image-within-email-and-automation-0000116744.htm
>>>
>>>haven't tried it.
>>>
>>>Nick
>>>
>>>>I'm currently embedding images into HTML that reference graphics on my website. What I want to do is give the customers of my software the option to self brand the calling cards. IE put their own graphics into the emails.
>>>>
>>>>Since my customers will not necesarilly have their own website to host the images, I'd have to FTP them up to a user folder. This sounds like a pain.
>>>>
>>>>I was wondering if there was any other way of embedding graphics into an email without using HTML to point to the graphics on the web.
>>>>
>>>>Can I embed the graphics directly into the email somehow?
>>>>
>>>>>Didn't you want to embed images into HTML?
>>>>>
>>>>>>
>>>>>>My HTML code points to images on a webpage at the moment, since the recipient won't have the images on their hard disk.
>>>>>>
>>>>>>>Did you try HTML that points to the image files on disk?
>>>>>>>
>>>>>>> <img src="file://h:\temp\whatever.jpg" ... />
>>>>>>>
>>>>>>>
>>>>>>>>I've created some OLE code that automates sending emails using Outlook which are effectively calling cards ... we will be calling on the ??/??/?? to carry out ..... etc etc
>>>>>>>>
>>>>>>>>In an effort to make these emails look as professional as possible I have used HTML to display graphics. The HTML points to graphics on my website.
>>>>>>>>
>>>>>>>>I now want to allow the user to select their own graphics to essentially brand these calling cards, but this will mean me automatically uploading the chosen graphic to my website & organising these graphics into "users folders"
>>>>>>>>
>>>>>>>>I am just wondering if there is another way to embed graphics into emails without the need for the HTML code to point to the website where the graphic files are uploaded to.
>>>>>>>>
>>>>>>>>I have in my mind that I once read that this was possible using VFP, but can't seem to remember where?
>>>>>>>>
>>>>>>>>Did I imagined this or this possible?
>>>>>>>>
>>>>>>>>TAI
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform