Jump to content
Sign in to follow this  
mrrlg

Inetsmtpmail

Recommended Posts

mrrlg

Is there a way using INETSMTPMAIL to send the one message to multiple users? My smtp server uses a semi-colon between addresses in mail addressed to multiple users. I would like to set up an automated message that would notify multiple users when a event takes place on the network.

Share this post


Link to post
Share on other sites
Xenobiologist

Is there a way using INETSMTPMAIL to send the one message to multiple users? My smtp server uses a semi-colon between addresses in mail addressed to multiple users. I would like to set up an automated message that would notify multiple users when a event takes place on the network.

HI,

http://www.autoitscript.com/forum/index.ph...c=23860&hl=smtp

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
mrrlg

I had looked at this link before using Inetsmtpmail. I am connecting to an internal smtp server and all the receipents are internal to the network.

This works with one user. When I try and add additional users it fails.

#include <INet.au3>

$s_SmtpServer = "10.X.X.X"
$s_FromName = "my name"
$s_FromAddress = "myname@sna.com"
$s_ToAddress = "User1@sna.com"
$s_Subject = "My Test SMTP"
Dim $as_Body[2]
$as_Body[0] = "Testing the new email alerts"
$as_Body[1] = "Sent through Auto It"
$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
$err = @error
If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf

In the script you referred me to I'm not sure how to configure these lines to point to the internal smtp server

$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×