nisus.comhttps://www.nisus.com/forum/ Send email messageshttps://www.nisus.com/forum/viewtopic.php?f=17&t=3366 Page 1 of 1

Author:  Kino [ 2009-03-30 20:39:09 ]
Post subject:  Send email messages

With this macro, you can send email messages extracted from the frontmost document via Mail.app.

Before using this macro...

1. In Mail.app, you have to add and configure mail accounts for From and/or Bcc addresses if you have not.

2. Set \$default{'From'}, \$default{'Bcc'} and '\$default{'Subject'} at the beginning of this macro.

3. Create a document in the following format:

From: MyName <myname@mac.com>
To: Paul X <paulX@xxx.xxx.xx>
Subject: Good News

Hello Paul,
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah
...
--------------------- Page Break ---------------------
To: Geoff Heartful <gheartful@xxx.xxx.xx>
Bcc: MyName <myname@yahoo.co.uk>
Subject: something witty

Hiya Geoff!
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah
...
--------------------- Page Break ---------------------
From: MyName <myname@gmail.com>
To: Louise Dupont <luised@xxx.xxx.xx>
Subject: Love...

Dear Louise,
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah
...

or a document consisting of just a single message.

From: MyName <myname@mac.com>
To: Peter Pinton <pp@xxx.xxx.xx>
Subject: re: Happy Birthday

Peter,
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah
...

You can omit From and Bcc (and even Subject) fields. \$default{'From|Bcc|Subject'} will be used for the omitted field(s).

Instead of Page Break, you can use Section Break as message separator.

When you run the macro, a dialog box will appear and ask you to choose one of the actions:

1 Open messages in Mail
2 Open messages in Mail (force Bcc)
3 Send messages by Mail
4 Send messages by Mail (force Bcc)

In cases 1 & 2, messages will be opened in Mail.app without being sent.
In cases 1 & 3, messages not having Bcc field will not be sent to Bcc address.
In cases 2 & 4, messages not having Bcc field will be sent to \$default{'Bcc'}.

LIMITATIONS:

- Headers other than From, To, Bcc and Subject are ignored.
- You cannot put multiple addresses in To or Bcc fields.
- You cannot send an attachment.
- You cannot send a rich text message.

This macro may/should contain bugs. Please try it with caution if you are interested in it.