rednosewoman Posted September 19, 2014 Share Posted September 19, 2014 Hey guys, first of all i have to metion that my english isn't the best, but i hope you will unsterstand my problem. I want to program a script which is able to open my standard mail client, filling Mailtoand so on.. My problem is, that i have to include an attachment (Picture from my desktop as emailbody) How can i manage it? _inetmail ("user@server.com","Pic of my desktop","C:usersuserdesktoppicture"") doesn't work at all... Best regards RNW Link to comment Share on other sites More sharing options...
water Posted September 19, 2014 Share Posted September 19, 2014 (edited) Welcome to AutoIt and the forum! What is your mail client? Outlook? Edited September 19, 2014 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
PainTain Posted September 19, 2014 Share Posted September 19, 2014 Just use the HTML-tag "<img>" in your email. Every (modern) mailclient can display HTML. Link to comment Share on other sites More sharing options...
rednosewoman Posted September 22, 2014 Author Share Posted September 22, 2014 Okay, but who do i include it into my code? Please help, thx! Link to comment Share on other sites More sharing options...
water Posted September 22, 2014 Share Posted September 22, 2014 http://www.w3schools.com/html/html_images.asp My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
rednosewoman Posted September 22, 2014 Author Share Posted September 22, 2014 okay, thanks! but could you edit my code to give me an example? Link to comment Share on other sites More sharing options...
water Posted September 22, 2014 Share Posted September 22, 2014 We do not spoon-feed users here First try it yourself. If you run into problems, ask and we will try to help. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
rednosewoman Posted September 23, 2014 Author Share Posted September 23, 2014 (edited) Hey again! I tried, but i did not get it yet. _inetmail ("xxx@yyy","xxxxx",""This is a test"<img src="Desktopscreenshot.jpg">"Test") What have i done wrong? edit: Autoit says syntax error Edited September 23, 2014 by rednosewoman Link to comment Share on other sites More sharing options...
water Posted September 23, 2014 Share Posted September 23, 2014 You really need to learn HTML "<HTML><Body>This is a test <img src="Desktopscreenshot.jpg"> Test</body></html>" My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
rednosewoman Posted September 23, 2014 Author Share Posted September 23, 2014 (edited) Are there any includes which i have to do? Because it says syntax error . Yeah i just started with autoit, didnt know i need hmtl for this Edited September 23, 2014 by rednosewoman Link to comment Share on other sites More sharing options...
water Posted September 23, 2014 Share Posted September 23, 2014 Check the help file for _inetmail and you will see which include is needed My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
rednosewoman Posted September 23, 2014 Author Share Posted September 23, 2014 #include <Inet.au3> i had this already included. how is it possible that he still says syntax error, when i use the function? i included the function you gave me in the _inet mail :S Link to comment Share on other sites More sharing options...
caramen Posted September 23, 2014 Share Posted September 23, 2014 (edited) #include <Inet.au3> ;=========================== $sMailTo = "xxxx@xxxx.com" $sMailSubject = "Hi" $sMailBody = "Hello i want to send that email to xxxx@xxxx.com <HTML code>" ;=========================== _INetMail ( $sMailTo, $sMailSubject, $sMailBody ) Maybe that can help you to understand the syntax becose you 're using 4 x double quote and with the help syntax you have to use 3 quote ? _inetmail ("*@*.com","Hi","Hello... <HTML code> ..") Edited September 23, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
rednosewoman Posted September 23, 2014 Author Share Posted September 23, 2014 (edited) It still says syntax error. I did it like water said! Edited September 23, 2014 by rednosewoman Link to comment Share on other sites More sharing options...
Bert Posted September 23, 2014 Share Posted September 23, 2014 no you didn't. Post you ENTIRE script and we can see what you tried. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
caramen Posted September 24, 2014 Share Posted September 24, 2014 (edited) "<HTML><Body>This is a test <img src="Desktopscreenshot.jpg"> Test</body></html>" This syntax cannot be used by the function you are using . becose you got 2x 2 quote put it in a variable $sMailBody = '<HTML><Body>This is a test <img src="Desktop\screenshot.jpg"> Test</body></html> ' Edit : Water's tips Edited September 24, 2014 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
water Posted September 24, 2014 Share Posted September 24, 2014 My bad. Should be single quotes around the whole string: '<HTML><Body>This is a test <img src="Desktop\screenshot.jpg"> Test</body></html>' or $sMailBody = '<HTML><Body>This is a test <img src="Desktop\screenshot.jpg"> Test</body></html>' if you want to try what Adventurer suggested. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
j0kky Posted September 24, 2014 Share Posted September 24, 2014 (edited) Desktopscreenshot.jpg I don't think it will works because it is a relative path, you should use instead: C:\users\user\desktop\screenshot.jpg Edited September 24, 2014 by j0kky Spoiler Some UDFs I created: Winsock UDF STUN UDF WinApi_GetAdaptersAddresses _WinApi_GetLogicalProcessorInformation Bitwise with 64 bit integers An useful collection of zipping file UDFs Link to comment Share on other sites More sharing options...
water Posted September 24, 2014 Share Posted September 24, 2014 Or even better: @DesktopDir & "\screenshot.jpg" My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Anteaus Posted September 25, 2014 Share Posted September 25, 2014 http://sourceforge.net/projects/blat/ Might be more suitable for this kind of task than Outlook. Takes a bit of figuring-out the right commandline parameters but once it's set up it's independent of any other email program, and can easily be scripted. We use this to send backup reports. If you want to send a picture such that it will display IN the email itself, use the embed option. 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