Contributed By: Markus Birth [email protected]
Submitted On: 07/04/98
First prepare an INI-File. I've got one for all scripts called Config.ini in my Macro Scheduler dir.
The Config.ini has to look as follows:
[Mail]
;Mailserver (SMTP) to use (Port 25)
SMTP=mail.prohosting.com
;Domain for the HELO command (anything)
SenderDomain=aol.com
; Config.ini ends here
And now the macro itself:
Let>INI=C:\Program Files\Macro Scheduler\Config.ini
ReadIniFile>INI,Mail,SMTP,mailserver
Let>runstring=telnet.exe
ConCat>runstring,mailserver
ConCat>runstring, 25
Run Program>runstring
WaitWindowOpen>Telnet - *
Wait>2
IfWindowOpen>Connect failed,Error
SetFocus>Telnet - *
Let>domain=HELO
ReadIniFile>INI,Mail,SenderDomain,dom2
ConCat>domain,dom2
SetFocus>Telnet - *
Send Character/Text>domain
Press Enter
Let>sender=MAIL FROM:
Input>send2,Enter sender-email or sender@email (server)
ConCat>sender,send2
SetFocus>Telnet - *
Send Character/Text>sender
Press Enter
Let>reci=RCPT TO:
Input>reci2,Enter recipient-email or reci@email (server)
ConCat>reci,reci2
SetFocus>Telnet - *
Send Character/Text>reci
Press Enter
Send Character/Text>DATA
Press Enter
Send Character/Text>Content-Type: text/html
Press Enter
Let>date1=Date:
Input>date2,Enter date
ConCat>date1,date2
SetFocus>Telnet - *
Send Character/Text>date1
Press Enter
Let>send3=From:
Input>send4,Enter sender-email (shown)
ConCat>send3,send4
SetFocus>Telnet - *
Send Character/Text>send3
Press Enter
Let>reci3=To:
Input>reci4,Enter recipient-email (shown)
ConCat>reci3,reci4
SetFocus>Telnet - *
Send Character/Text>reci3
Press Enter
Let>subj=Subject:
Input>subj2,Enter subject
ConCat>subj,subj2
SetFocus>Telnet - *
Send Character/Text>subj
Press Enter
Press Enter
Message>Now take over the TelNet session and type your eMail. When finished, type a single dot on a line. You should get an OK-message. Now type QUIT.
SetFocus>Telnet - *
Goto>End
Label>Error
Press Enter
CloseWindow>Telnet - *
Message>WARNING! Server could not be reached. Check your settings in the INI File.
Label>End
That's it. The eMail-addresses which are marked as (server) are used for delivery and those which are marked as (shown) are only shown in the mail. The shown email-addresses have no influence to the delivery of the mail.
A Script to send Mails with the Win95-Telnet-Client
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact: