Page 2 of 2 <12
Topic Options
#87982 - 2002-09-17 11:03 PM Re: Send E-mail with COM
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
like I said before, with it you can mail as your boss, neat isn't it? [Big Grin]
_________________________
!

download KiXnet

Top
#87983 - 2002-09-18 12:48 AM Re: Send E-mail with COM
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
#87984 - 2002-09-18 12:57 AM Re: Send E-mail with COM
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, I did test drive on our network and then disabled that totally [Big Grin]

if you do:
mail from:your_boss_e-mail@your.domain
rcpt to:bill.gates@microsoft.com

it should go just fine.
I don't know why the addresses do not show up as they should.
might be that your isp's e-mail server is stupid that it can't use the real e-mail address as displayname....
dunno.
_________________________
!

download KiXnet

Top
#87985 - 2002-09-18 11:12 AM Re: Send E-mail with COM
Breaker Offline
Hey THIS is FUN
*****

Registered: 2001-06-15
Posts: 268
Loc: Yorkshire, England
Just as an update to the intertwined discussion here about the limitations of the Outlook security update - here is the article I used to help me get around this for an Access application I wrote earlier this year.

Q263297 - Admin Info about the Outlook E-mail Security Update

There's a couple of links in the article telling you where to download the admin tools and how to set up the admin custom form for email security settings - v. useful if you have Exchange and have problems sending mail programmatically by automating Outlook in your scripts.

Obviously there are other ways (Blat, Postie, direct telnet session to SMTP, etc) but sometimes its nice to leverage the framework that's already in place, using the otions to keep copies of sent mail, etc.

By the way, Lonkero - is there anywhere you can point me to for an SMTP command reference? Thanks in advance!
_________________________
================================================
Breaker


Top
#87986 - 2002-09-18 11:20 AM Re: Send E-mail with COM
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, here is easy to read one...
and links:
http://www.networksorcery.com/enp/protocol/smtp.htm
_________________________
!

download KiXnet

Top
#87987 - 2002-09-18 04:32 PM Re: Send E-mail with COM
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 Offline
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
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
#87990 - 2002-09-18 05:43 PM Re: Send E-mail with COM
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Don't forget to double up those "@" signs to avoid conflicts with macros..
"Kirk@@volvotruckcentre.com", not "Kirk@volvotruckcentre.com"

Top
#87991 - 2002-09-19 08:44 AM Re: Send E-mail with COM
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I quess one has to update his udf...
and did.

[ 19. September 2002, 09:19: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
Page 2 of 2 <12


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.15 seconds in which 0.118 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org