• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Mailing with a do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Mailing with a do shell script


  • Subject: RE: Mailing with a do shell script
  • From: "de Runtz, Lars" <email@hidden>
  • Date: Thu, 15 Dec 2005 10:16:59 -0800
  • Thread-topic: Mailing with a do shell script

Title: Re: Mailing with a do shell script
1) Create a file tmpEMail.txt (can also be done with AppleScript)
2) Use the Do Shell Script to send it
 
The lines of the tmpEMail.txt need to be spearated by newlines, which are carriage return then linefeeds, or the other way around.  The text of the file would be like:
 
MIME-Version: 1.0
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
content-class: urn:content-classes:message
Subject: This is a TEST
Date: Wed, 9 Nov 2004 11:19:12 -0800
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
X-Priority: 1
Priority: Urgent
Importance: high
X-Message-Flag: Lars DeRuntz - sendmail
Errors-To: email@hidden
From: "de Runtz, Lars" <email@hidden>
To: "de Runtz, Lars" <email@hidden>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6249.1">
<TITLE>TEST</TITLE>
</HEAD>
<BODY BGCOLOR=3D"LIGHTGREY">
<CENTER>
<TABLE BORDER=1>
<TR><TD BGCOLOR=3D"BLUE">Lars</TD><TD></TD><TD BGCOLOR=3D"BLUE">DeRuntz</TD></TR>
<TR>
<TD></TD>
<TD BGCOLOR=3D"BLUE">
<FONT COLOR=3D"WHITE" SIZE=3D4 FACE=3D"Arial"><B>
TEST &nbsp; -Lars
</B></FONT>
</TD>
<TD></TD>
</TR>
<TR><TD BGCOLOR=3D"BLUE">Modus</TD><TD></TD><TD BGCOLOR=3D"BLUE">Link</TD></TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
 
Once the file is created, it be sent with the do shell script command:
 
cat tmpEMail.txt | /usr/sbin/sendmail ; /usr/sbin/sendmail -q
 
I'm doing this is the bash shell with cron, but it should be very doable with AppleScript.  I may have made an AppleScript for this a while back, but that may take me a while to find.
 
-Lars DeRuntz
ModusLink
Newark, CA

-----Original Message-----
From: Jay Louvion [mailto:email@hidden]
Sent: Thursday, December 15, 2005 9:21 AM
To: de Runtz, Lars; AS AppleScript Users
Subject: Re: Mailing with a do shell script


On 14/12/05 22:31, "de Runtz, Lars" <email@hidden> wrote:

Create a file with basic headers


And what would that look like ? I’m sorry to be such a newbie on this, but having been through so much trial and error with the command line, I really would appreciate a solid example to be able to adapt it to my needs.

Best and thanks in advance,

J.

Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva

T+4122 840 3272
F+4122 840 3271

skypeme:
jaylouvion

www.studiocasagrande.com


P Please consider the environment before printing this email.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Set hours of date = stack overflow error on 10.3.9?
  • Next by Date: Re: PDF to Tif
  • Previous by thread: Re: Mailing with a do shell script
  • Next by thread: Save in Image Events
  • Index(es):
    • Date
    • Thread