Tema: Re: mail siuntimas per cmd
Autorius: Aleksandr Reznik
Data: 2009-09-24 14:27:30
as naudoju VBS scripta:
ServerName = "Myserver"
SMTPserver="mail.mail.com"
EmailAddress = "yourmail@mail.com"
sub Notify (ServerName)
wscript.echo "Backup completed! SENDING notificaton to "& EmailAddress
Subject = "Server " & servername & " Backed up!"
Body = "Server"&ServerName & " Backed up!"
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Subject
objMessage.From = "freespace@my.com"
objMessage.To = EmailAddress
objMessage.TextBody = Body
'==This section provides the configuration information for the remote SMTP
server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPserver
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
set objMessage = nothing
end sub
--
Aleksandr Reznik
IT Consultant , MCT, MCSE, MCDBA, CISSP
UAB "Alpha consulting"
+37064752717
www.alphaconsulting.lt
"Dalius" <azuolas@email.lt> wrote in message
news:h8rhgm$kaj$1@trimpas.omnitel.net...
> Sveiki, rasau backup scripta reikia kad isiustu maila - "backupas
> padarytas"
>
> reikia smpt autentifikacijos.
>
> Su kuo padaryt? powershell?
>
> Server 2003
>