Page 1 of 1
sending emails
Posted: Sat Jul 07, 2012 7:08 pm
by Happyrever
Some while ago I cobbled together a simple email generator to send an all text message.
I now need to send messages as part of a mail shot but to include an image.
The body of the message will consist of a few introductory lines of text, followed by the image and concluding with a goodby text.
I do not wish to send the image as an attachment.
Any ideas how this might be done?
Re: sending emails
Posted: Sat Jul 07, 2012 7:20 pm
by shaosean
You would need to use MIME and put in a HTML part..
Re: sending emails
Posted: Sat Jul 07, 2012 7:22 pm
by gpb01
Hi,
look on this page :
http://www.troz.net/rev/index.irev?category=All and you will find two libraries :
POP_Library_Demo and
SMTP_Library_Demo
Maybe can help ...
Guglielmo
Re: sending emails
Posted: Sun Jul 08, 2012 10:12 am
by Happyrever
shaosean I dont understand your reply, it is beyond my experience.
What does it look like in code, to pick up the image?
gpb01 I have tried these before, but things have moved on and they no longer work.
It is not worth the time to debug the software.
the code i have used in the original text only email sender is:-
on mouseUp
global Addresslines,loop
set the itemDelimiter to tab
put number of lines in field "Address list" into Addresslines
put loop + 1into loop
if item 2 of line loop of field "Address list" <> 1 then
put item 1 of line loop of field "Address list" into field "Message address"
put 1 into item 2 of line loop of field "Address list"
put loop into item 3 of line loop of field "Address list"
put loop into field "counter"
revmail field "Message address",,Field "Subject",field "Message body"
end if
if loop > Addresslines then
answer "end of list"
end if
end mouseUp
So what line do i have to add to pick up the image?
Thanks.
Re: sending emails
Posted: Sun Jul 08, 2012 8:17 pm
by shaosean
Just a quick little recap about the email system:
- SMTP is the network protocol used to send emails, it has no idea about the actual email message format (nor does it really care)
- MIME is an add-on to the email message format that allows you to include attachments and rich text emails, it knows nothing about SMTP
When you compose your message in Rev, you will need to take the text of the field and convert it to a plain text version, as well as a rich text version (usually HTML).. When you have all the parts that you need (including attachments and inline images) you need to build a properly formatted MIME message and then you send that through SMTP (which is the library noted above)..
Now apparently Rev still does not have MIME nor SMTP support, and the SMTP library that is available no longer works, so you will need to roll our own or find another set of libraries to do this for you..
Re: sending emails
Posted: Sun Jul 08, 2012 8:36 pm
by Happyrever
shaosean
Thank you for your explanation. So I am stuffed.
Why does it not surprise me that Rev is not up to speed!
Re: sending emails
Posted: Mon Jul 09, 2012 6:11 am
by shaosean
In all honesty writing a simple MIME encoder and SMTP socket are not all the difficult.. MIME decoder on the other hand *blargh*
Re: sending emails
Posted: Tue Jul 10, 2012 11:12 am
by shaosean
If you can wait a couple of weeks I can get SMTP and MIME encoding ready for you..
Re: sending emails
Posted: Fri Jul 13, 2012 9:32 am
by Happyrever
that is very kind, however, with lateral thinking, i have come up with an easier solution.