lolp1 Posted November 8, 2007 Share Posted November 8, 2007 Is there any UDF's or some already-written code of sending an email with an attachment - or do I need to wip something up my self? Link to comment Share on other sites More sharing options...
Developers Jos Posted November 8, 2007 Developers Share Posted November 8, 2007 Look for _INetSmtpMailCom() in the examples forum .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lolp1 Posted November 8, 2007 Author Share Posted November 8, 2007 Look for _INetSmtpMailCom() in the examples forum ..Looks nice$s_SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIREDWhich infos would go here for hotmail? Link to comment Share on other sites More sharing options...
lolp1 Posted November 8, 2007 Author Share Posted November 8, 2007 Hi well I tried a few things and I can't seem to even get it to succsfully send an email let a lone an attachment. Any nice examples? Link to comment Share on other sites More sharing options...
Developers Jos Posted November 8, 2007 Developers Share Posted November 8, 2007 (edited) Hi well I tried a few things and I can't seem to even get it to succsfully send an email let a lone an attachment. Any nice examples?Its in the thread where I posted this UDF and it works fine for me ...Maybe you can show the code that call this UDF ?What OS/IE versions are you running on ? Edited November 8, 2007 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lolp1 Posted November 9, 2007 Author Share Posted November 9, 2007 #Include<file.au3> #include<twst.au3> $s_SmtpServer = "smtp.gmail.com"; address for the smtp-server to use - REQUIRED $s_FromName = "**"; name from who the email was sent $s_FromAddress = "**@gmail.com"; address from where the mail should come $s_ToAddress = "***@hotmail.com"; destination address of the email - REQUIRED $s_Subject = "Userinfo"; subject from the email - can be anything you want it to be $as_Body = "Oo"; the messagebody from the mail - can be left blank but then you get a blank mail $s_AttachFiles = "lol.txt"; the file you want to attach- leave blank if not needed $s_CcAddress = ""; address for cc - leave blank if not needed $s_BccAddress = ""; address for bcc - leave blank if not needed $s_Username = "Slammedd@gmail.com"; username for the account used from where the mail gets sent - REQUIRED $s_Password = "**"; password for the account used from where the mail gets sent - REQUIRED $IPPort=465; port used for sending the mail $ssl=1; enables/disables secure socket layer sending - put to 1 if using httpS Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, "") If @error then msgbox(0,"Error sending message","Error code:" & @error & " Description:" & $rc) EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted November 9, 2007 Developers Share Posted November 9, 2007 pretty sure you are missing some parameters. this is a line from the posted example:$rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now