crystalburner Posted October 6, 2006 Share Posted October 6, 2006 Hey! I have used _Inetsend to create a new email message, but ... I want to put the recipients in the bcc field not the to... Anyone got a sharp idea? Link to comment Share on other sites More sharing options...
Fossil Rock Posted October 6, 2006 Share Posted October 6, 2006 There's a _Inetsend command in AUtoIT now ??!!! Cool, I need to look into that. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
BitRot Posted October 6, 2006 Share Posted October 6, 2006 I have used _Inetsend to create a new email message, ... Anyone got a sharp idea?Yeah. Tell me where you got that command from, as it does not appear in my copy of AI ... I take it you ment "_InetSmtpMail" ? If so, you will have to update the origional functions code (in the "inet.au3" file, located in your include-folder), or create a new function allso containing an "$s_CcAddres" -argument, based on that origional one. The "CC:" line looks pretty-much like the "To:" line, only you can just place the CC-recipients E-mail adresses in there, seperated by semi-colons :CC: Someone1@Server1;Someone2@server2Just insert it into the "$s_Send[4]" -variable (preferrably, but not nessecarily under the "To:" -line), and you're good to go. Hope that helps. Link to comment Share on other sites More sharing options...
crystalburner Posted October 6, 2006 Author Share Posted October 6, 2006 Yeah. Tell me where you got that command from, as it does not appear in my copy of AI ... I take it you ment "_InetSmtpMail" ? If so, you will have to update the origional functions code (in the "inet.au3" file, located in your include-folder), or create a new function allso containing an "$s_CcAddres" -argument, based on that origional one. The "CC:" line looks pretty-much like the "To:" line, only you can just place the CC-recipients E-mail adresses in there, seperated by semi-colons :Just insert it into the "$s_Send[4]" -variable (preferrably, but not nessecarily under the "To:" -line), and you're good to go. Hope that helps. sorry its this one #include <INet.au3> _INetMail ( $s_MailTo, $s_MailSubject, $s_MailBody ) u can only specify $s_mailto not $s_mailbcc Link to comment Share on other sites More sharing options...
crystalburner Posted October 6, 2006 Author Share Posted October 6, 2006 sorry its this one#include <INet.au3>_INetMail ( $s_MailTo, $s_MailSubject, $s_MailBody )u can only specify $s_mailto not $s_mailbcchmm maybe a little hackeroo of the includeFunc _INetMail($s_MailTo, $s_MailSubject, $s_MailBody) Local $prev = opt("ExpandEnvStrings", 1) Local $var = RegRead('HKCR\mailto\shell\open\command', "") Local $ret = Run(StringReplace($var, '%1', _INetExplorerCapable('mailto:' & $s_MailTo & '?subject=' & $s_MailSubject & '&bcc=' & $s_MailBody))) opt("ExpandEnvStrings", $prev) Return $retEndFunc ;==>_INetMail Link to comment Share on other sites More sharing options...
crystalburner Posted October 6, 2006 Author Share Posted October 6, 2006 hmm maybe a little hackeroo of the includeFunc _INetMail($s_MailTo, $s_MailSubject, $s_MailBody) Local $prev = opt("ExpandEnvStrings", 1) Local $var = RegRead('HKCR\mailto\shell\open\command', "") Local $ret = Run(StringReplace($var, '%1', _INetExplorerCapable('mailto:' & $s_MailTo & '?subject=' & $s_MailSubject & '&bcc=' & $s_MailBody))) opt("ExpandEnvStrings", $prev) Return $retEndFunc ;==>_INetMailYEP! perfecto!!! Link to comment Share on other sites More sharing options...
BitRot Posted October 6, 2006 Share Posted October 6, 2006 (edited) YEP! perfecto!!!Not quite : the origional mailbody has disappeared, and the code is not compatible with the origional anymore (which could cause strange results when used by example (not written by yourself) scripts). You can replace the "_InetMail" function with the below. It ADDS a CC and BCC option to it (meaning : you can use it as normal, and with the new options) : Func _INetMail($s_MailTo, $s_MailSubject, $s_MailBody,$s_CCTo="",$s_BCCTo="") Local $prev = opt("ExpandEnvStrings", 1) Local $var = RegRead('HKCR\mailto\shell\open\command', "") local $argument='mailto:' & $s_MailTo & '?subject=' & $s_MailSubject if $s_CCTo>"" then $argument &= '&cc=' & $s_CCTo if $s_BCCTo>"" then $argument &= '&bcc=' & $s_BCCTo $argument &= '&body=' & $s_MailBody Local $ret = Run(StringReplace($var, '%1', _INetExplorerCapable($argument))) opt("ExpandEnvStrings", $prev) Return $ret EndFunc ;==>_INetMail Hope that helps. Edited October 6, 2006 by BitRot Link to comment Share on other sites More sharing options...
wysocki Posted March 25, 2007 Share Posted March 25, 2007 Very nice! Now is there any way to change the "Sender" field? I'd like to change the sender to something like "Automated Message". I looked at the mailto: docs and don't see it listed. 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