#87983 - 2002-09-18 12:48 AM
Re: Send E-mail with COM
|
Anonymous
Anonymous
Unregistered
|
Yeah, it's pretty cool but how do you mean you could mail as your boss? I can't get the Sender's and recipient's addresses to show up on the sent e-mails. It goes to where it's supposed to and the Subject line and message body are there but the "from" and "to" fields are blank.
|
|
Top
|
|
|
|
#87987 - 2002-09-18 04:32 PM
Re: Send E-mail with COM
|
Anonymous
Anonymous
Unregistered
|
Read your Reference Lonkero and found this interesting tidbit in the Memo that the commands refer to:
The second step in the procedure is the RCPT command.
RCPT TO:"<"forward-path">" [ SP "<"rcpt-parameters">" ]
The first or only argument to this command includes a forward-path (normally a mailbox and domain, always surrounded by "<" and ">" brackets) identifying one recipient.
Could this be the reason I can't see the "to" and "from" fields? I'll give it a try and get back to you.
Kirm
P.S. I had to put qoutes on the command brackets or they are striped.
|
|
Top
|
|
|
|
#87988 - 2002-09-18 05:09 PM
Re: Send E-mail with COM
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
You will need to use message headers to add the information.
Immediately after the "DATA" and before you enter the blank line, issue the fields:
code:
From: Display_From_Name <from@address> To: Display_To_Name <to@address> Subject: Subject_Line
Your blank line seperated the mail headers from the actual message.
There are loads of headers for return receipts, MIME encoding and so-on.
|
|
Top
|
|
|
|
#87989 - 2002-09-18 05:29 PM
Re: Send E-mail with COM
|
Anonymous
Anonymous
Unregistered
|
Thanks Richard. That's done it...at least partially.
Here's my code:
code:
$r = $r +","+ SendKeys("DATA{ENTER}") Sleep 1 $r = $r +","+ SendKeys("From: Kirk <kirk@volvotruckcentre.com>{ENTER}") Sleep 1 $r = $r +","+ SendKeys("To: Captain Kirk <kirk@volvotruckcentre.com>{ENTER}") Sleep 1 $r = $r +","+ SendKeys("Subject: $subject{ENTER}{ENTER}") Sleep 1
And here's what comes out:
From: Kirk [kirk unknown:volvotruckcentre.com] To: Captain Kirk
It's definately picking up the aliases but is missing the actual addresses. Must be our mail server.
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 1662 anonymous users online.
|
|
|