Jump to content

Recommended Posts

Posted

Heya guys,

 

I'm kinda new to AutoIT and was wondering if you guys could help me out. I'm trying to make a script that emails me a copy of my file every time changes are made to it. However, while testing the email portion of the script, I get the errors " error: can't open include file <_NetSmtpMailCom.au3>" and "error: _InetSmtpMailCom() : undefined function."

 

I'm not exactly sure why this is happening and was wondering if someone could explain it to me.

#include <misc.au3>
#include <file.au3>
#include <Inet.au3>
#include <_INetSmtpMailCom.au3>
    Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
    $SmtpServer = "smtp.gmail.com"
$FromName = "Person"
$FromAddress = "firstemail@gmail.com"
$ToAddress = "secondemail@gmail.com"
$Subject = "Logs"
$Body = FileReadLine('index.txt',"Report")
$AttachFiles = "index.txt"
$CcAddress = ""
$BccAddress = ""
$Importance = "Normal"
$Username = "firstemail@gmail.com"
$Password = "PASSWORDforEMAIL"
$IPPort = 465
$ssl = 1
    $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)

Posted
1 hour ago, kylomas said:

HankHell,

The include file is Inet.au3...

kylomas

when I take

#include <_INetSmtpMailCom.au3>

out of the script, it still gives me "error: _INetSmtpMailCom(): undefined function." though.

Posted
25 minutes ago, Jos said:

That is a UDF I wrote and not in any standard include file. Just search the examples forum for the source.

Jos

ah I found it, this makes things much much easier, thanks a bunch

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
×
×
  • Create New...