Source language: Translate to:

SendMail

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

SendMail

Postby FM » Mon Feb 05, 2007 9:55 am

Since it is possible to send html messages with "SendMail" command, is it possible to send HTML embedded image files?

If not, is a suggestion. I think it should not be so difficult.

Thank you!
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Postby Gaev » Mon Feb 05, 2007 10:41 am

I second that suggestion ... emails that look like web pages ... are very impressive ... and I haven't found any other tools that can let a NeoBook application do this (at run time ; from users' machine)
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Neosoft Support » Mon Feb 05, 2007 11:21 am

Maybe we can do something like this in the future.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby edunaway » Mon Feb 05, 2007 11:50 am

You can already do this by pointing to the images on a public server and this is how most HTML emails are sent anyway; the images aren't actually attached to the email.

However, NB needs to be modified to send in the email header that the content type is HTML so that the email client will "know" to render the message as a web page instead of just displaying it as text. I haven't examined NB's headers, but it's probably not even sending a content type value or it's using ASCII which means the message is text so the email client ignores the html tags.

-eric
edunaway
 
Posts: 88
Joined: Wed May 04, 2005 9:17 am

HTML e-mail

Postby FM » Mon Feb 05, 2007 1:32 pm

It is possible to send HTML emails with Neobook. You have to send html code as the body of the sessage, begining with <html> in the first line.

You can send the images attached to the HTML, not like normal attachments but visible only in the body text. I use BLAT. Is a command line email sender. Is freeware and can be downloaded form:

http://www.blat.net

The HTML code have to be:

<img src=CID:"myimage.jpg"> etc...

But I was wondering if I can do this with NB, without third party software.
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Re: HTML e-mail

Postby dpayer » Mon Feb 05, 2007 2:39 pm

FM wrote:It is possible to send HTML emails with Neobook.
But I was wondering if I can do this with NB, without third party software.


The NB helpfile says: The message text can be either plain text or HTML. Line breaks can be entered into the message body using the pipe character “|”.

Sending HTML mail is a question of knowing how to format the data.

You may want to review the guiding RFCs and format your content accordingly.
RFC2822, RFC2045, RFC2046, RFC2048, RFC2049

http://www.faqs.org/rfcs/

D
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby HPW » Mon Feb 05, 2007 11:32 pm

I used Sendmail for HTML since neobook 4 without problems.
But until now without images.

<img src=CID:"myimage.jpg">


This hint is very usefull, since we can add attachments.
So it should be possible to make the HTML and reference the images from the attachments.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

html emails

Postby FM » Tue Feb 06, 2007 12:29 am

We know that we can send HTML e-mails with Sendmail. The only thing is how to send embedded images.

With NB we can send normal attachments, but I want to send the images for the message body, only visible there, not like normal attachments.

There is a TM plug-in called TM Relay, that can do so (and other things), but it is very expensive for me ($49) (and not available until 01 february!?!?). That's why I use BLAT.
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

HTML emails

Postby FM » Tue Feb 06, 2007 12:31 am

I made a mistake. The code is:

Code: Select all
<img src="cid:image.jpg">


the quote mark is before cid:.
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Postby HPW » Tue Feb 06, 2007 1:00 am

I tried it with the attachment like this

Code: Select all
<IMG src="CID:logo_small06.gif">


The attachment is there but Outlook does not show the logo.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Tue Feb 06, 2007 1:44 am

With NB we can send normal attachments, but I want to send the images for the message body, only visible there, not like normal attachments.


For what I read on the net, you need the HTML syntax for correct MIME-Embedding of images and the mime-stream itself.

PS: hpwImageSaveToMimeStream can help for the mime-stream
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

HTML emails

Postby FM » Tue Feb 06, 2007 2:36 am

I tested Outlook with normal attached image files.

Then, you should use the code without CID:

<IMG SRC="myimage.jpg">

Maybe CID: is only for MIME embedded files.
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Postby HPW » Tue Feb 06, 2007 3:15 am

Thanks for tip. Works for me also.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Gaev » Tue Feb 06, 2007 6:36 am

A bit confused by all the postings ... before I try out "blat", perhaps someone can point out if the following is doable with NeoBook's SendMail command.

Say I want to display some image(s) in the content of the received message ... at a specific location and of a specific size ... not just a copy of the attached image files at the ned of the text (like Outlook Express does) ... say my "message" parameter of the SendMail command is ...
<html>
<head></head>
<body>

<p> First paragraph text</p>

<p>
<img {???? code for abc.jpg} />
<img {???? code for xyz.jpg} />
</p>

<p> Last paragraph text</p>

</body>
</html>
... then, in order to display images abc.jpg and xyz.jpg between the first and last paragraph text in the content of the received message ...

1) What do I code in place of {???? code for abc.jpg} and {???? code for xyz.jpg} ?

2) Do I also need to specify files abc.jpg and xyz.jpg in the "attachments" parameter of the SendMail command ?


Also, would the same technique work with flash (*.swf) files ... as long as the <img> tag is replaced by the appropriate <object> tag ?
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby dpayer » Tue Feb 06, 2007 7:20 am

Gaev wrote:A bit confused by all the postings ... before I try out "blat", perhaps someone can point out if the following is doable with NeoBook's SendMail command.

Say I want to display some image(s) in the content of the received message ... at a specific location and of a specific size ... not just a copy of the attached image files at the ned of the text (like Outlook Express does) ... say my "message" parameter of the SendMail command is ...
<html>
<head></head>
<body>

<p> First paragraph text</p>

<p>
<img {???? code for abc.jpg} />
<img {???? code for xyz.jpg} />
</p>

<p> Last paragraph text</p>

</body>
</html>
... then, in order to display images abc.jpg and xyz.jpg between the first and last paragraph text in the content of the received message ...

1) What do I code in place of {???? code for abc.jpg} and {???? code for xyz.jpg} ?

2) Do I also need to specify files abc.jpg and xyz.jpg in the "attachments" parameter of the SendMail command ?


Also, would the same technique work with flash (*.swf) files ... as long as the <img> tag is replaced by the appropriate <object> tag ?


Couple points to be aware of:

1) The labeling of the mime encoding is important. Before simply putting in declaration of a mime attachment. You have to define it as multipart

Code: Select all
This is a multi-part message in MIME format.

------=_NextPart_000_000F_01C7478C.8E8A72A0
Content-Type: multipart/alternative;
        boundary="----=_NextPart_001_0010_01C7478C.8E8A72A0"


------=_NextPart_001_0010_01C7478C.8E8A72A0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

------=_NextPart_001_0010_01C7478C.8E8A72A0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

------=_NextPart_000_000F_01C7478C.8E8A72A0
Content-Type: image/gif;
        name="image.gif"
Content-ID: <001201c7478c$8e8a72a0$0


In the above example, you would insert the appropriate data after each statement. The delineating code is arbitrary but if I recall right the length is significant - one would need to check the RFC on MIME attachments in RFC compliant mail.

When you do it this way the HTML is defined as MIME content (though you don't need to encode it)

2) if you try to include a flash attachment, the email security rules will kick in and by default, the HTML redering (it does use MSIE by the way in Outlook Express - the first window pane on the right as you open it up is loaded as an HTML page by OE) will block ActiveX and scripting (javascripts don't work right on an email 'page'). This effectively controls using this method to send Flash in an email. If the other side does not have an explicit right to open ActiveX objects, it will not work.

David P.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Next

Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron