#115751 - 2004-03-09 05:06 PM
Re: Sending Mail
|
tr6boy
Starting to like KiXtart
Registered: 2001-10-24
Posts: 131
|
OK, so let's say more specifically I want to use Howard's method. So I need to register the dll, which I did on my test machine. Then I tried to execute the code as follows:
Code:
Method Email($MailHost, $To, $From, $Subject, $Body) ; Sends an email from your script. ; Be sure to double the "@" in the email address. $Win32Admin = createobject("Win32Admin")
$mailhost = 'smtp.cintas.com' $to = 'creamerm@@cintas.com' $from = 'creamerm@@cintas.com' $subject = 'Test Message' $body = 'Email from KiXtart is great!'
if $Win32Admin.Email($mailhost, $to, $from, $subject, $body) ? ? "Email to " + $to + " sent." ? else ? ? "Email Failed! @serror" ? endif
The script completes, but I never receive the email.
My machine is an Outlook client to an Exchange server, which is also our SMTP server. I thought that in order for my machine to send that message via a non-Outlook client, the Exchange server would have to be configured to allow me to relay the message off of it. But if from your reply, you're saying that's not the problem, what else might I check?
Thanks Jens,
|
|
Top
|
|
|
|
#115755 - 2004-03-09 09:33 PM
Re: Sending Mail
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I would suggest asking the mail admins what DNS name should be used as the target for SMTP mail. We have a couple Unix computers that serve as our generic targets for SMTP mail.
I would have thought that you should have received an error from your script if the target server did not accept your email.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(mole)
and 1300 anonymous users online.
|
|
|