Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I send to a list from the desktop?

Disclaimer, on Exchange Server

How do I send to a list from the desktop?

by  jnicks  Posted    (Edited  )
SENDING EMAIL FROM THE DESKTOP IN EUDORA
[ul]Summary: With a very little code one can make a Desktop link that will let you edit a message and then automatically use an Eudora Email Client, even Lite, to automatically send the message to the list.
[/ul][tt]
Suppose you have to send Emails to a list of people frequently. Let's automate it to one click from the desktop.

The file names are be
Code:
  - Message.txt  the message you wish to send
  - ToList       the list of email addresses you want to
                   send to, one per line, left justified
  - SendEm.Bas   a QuickBASIC program that can be easily
                 redone in any BASIC, or application BASIC
                 support, Active-X, and so forth.

1. Make a batch file to edit Message.Txt and then send it to everyone in file ToList.
Code:
  @echo off
  c:
  cd \messages
  start /w notpad Message.Txt
  qbasic /r sendem

You may not have QBasic, look on any old DOS diskettes from 3.0 to 6.22, or, simply put it in a Basic of your choice. We have only used very primitive BASIC statements so it should not be hard.

The BASIC source:

Code:
  DECLARE SUB waitsecs (secs!)
  eudora$ =
"E:\wpr\eudora\eudora.exe "
Code:
  ' Space at end! ! !
  SHELL eudora$: waitsecs 3

  OPEN
"tolist"
Code:
 FOR INPUT AS #1
  DO WHILE NOT EOF(1)
     LINE INPUT #1, a$: a$ = rtrim$(ltrim$(a$))
     OPEN "HEADER" FOR OUTPUT AS #2
       PRINT #2, "To: "; a$
       PRINT #2,
     CLOSE 2
     SHELL "COPY header + message.txt  message.msg > nul:"
     waitsecs 1
     SHELL eudora$ + curdir$ + "\message.msg":
waitsecs 5
Code:
     PRINT "Sent to "; a$
  LOOP
  CLOSE
  kill "header"
  SYSTEM

  SUB waitsecs (secs)
    oldtim$ = TIME$
    FOR i = 1 TO secs
      WHILE TIME$ = oldtime$: WEND
      oldtime$ = TIME$
    NEXT
  END SUB

Comments on items in Bold:

You will have to change "E:\wpr\eudora\eudora.exe " to point to wherever your Eudora.exe is.


tolist is just an ASCII file (text) of addresses to send to. They could be multiple.

Code:
   j@roninsg.com
   gw@whitehouse.gov
   BillGates@dorsalOrifice.com
   support@tek-tips.com, info@tek-tips.com, sales@tektips.com
    . . .

waitsecs This is a dumb little loop that waits 'i' seconds.

Waiting is needed for Eudora to settle down and accept a message. The timings here are slow, and work on an old 233 mHz system.

We wait after launching Eudora, after COPYing, and after sending Eudora a message.

On your BASIC, if time returns hundredths it will wait 'i'/100 seconds, which won't be too good. In those cases it is better to use SLEEP if available, or a Timer, or, ...


Other notes:

You do not need a Subject but it is good to have one.
You may spoof From:
Attachments are X-Attachments:
as in
Code:
       PRINT #2, "From "; myname$
       PRINT #2, "Subject:  "; theSubject$
       PRINT #2, "X-Attachments:  c:\autoexec.bat, c:\config.sys"


The Eudora documentation is at:

http://eudora.com/developers/

go to 'Command Line for Windows" about halfway down.

[/tt]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top