Jump to content

_Inetsend


Recommended Posts

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 ... :lmao:

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@server2

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.

Link to comment
Share on other sites

Yeah. Tell me where you got that command from, as it does not appear in my copy of AI ... :lmao:

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

sorry its this one

#include <INet.au3>

_INetMail ( $s_MailTo, $s_MailSubject, $s_MailBody )

u can only specify $s_mailto not $s_mailbcc

hmm maybe a little hackeroo of the include

Func _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 $ret

EndFunc ;==>_INetMail

Link to comment
Share on other sites

hmm maybe a little hackeroo of the include

Func _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 $ret

EndFunc ;==>_INetMail

YEP! perfecto!!!

Link to comment
Share on other sites

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). :lmao:

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 by BitRot
Link to comment
Share on other sites

  • 5 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...