Jump to content

Search the Community

Showing results for tags 'task scheduler email'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi All - I believe there was another thread on this issue, but to keep things simple, I wanted to start a new one. If this is in poor taste, I do apologize, here goes. What the script does: Looks to a txt files that has a list of computer. Goes line by line and pings each machine. If it does not ping back, it emails me with the machine in the subject line. That's it. The script works perfectly, when running manually (through explorer). I get msgbox confirmations and the emails send. However, when running the same script through task scheduler, it will not send the email and no msgboxes appear. I am not as concerned with the msgboxes, as I am with just ensuring that the emails work. The smtp server does not require any authentication and is internal. Any ideas?? I appreciate any help that can be given. Thank you in advance. Code below and attatched: #include <Inet.au3> #include <MsgBoxConstants.au3> $file = FileOpen("checks.txt" , 0) While 1 $answer = FileReadLine($file) If @error Then Exitloop local $ping1 = Ping($answer, 4000) If $PING1 = 0 Then Local $s_SmtpServer = "smtp.xxxxx.com" Local $s_FromName = @computername Local $s_FromAddress = @computername Local $s_ToAddress = "xxxxx@xxxxx.com" Local $s_Subject = ""& $answer &" DOWN" Local $as_Body[2] $as_Body[0] = "" Local $iResponse = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1) Local $iErr = @error $Username = "" ; password for the account used from where the mail gets sent - REQUIRED $Password = "" ; port used for sending the mail $IPPort = 25 ; enables/disables secure socket layer sending - put to 1 if using httpS $ssl = 0 If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf ;MsgBox(0, "Status", ""& $answer &" Offline",3) else ;MsgBox(0, "Status", ""& $answer &" Online",3) EndIf Wend FileClose($file) checks - forum.au3
×
×
  • Create New...