Jump to content

Recommended Posts

Posted

as part of the ITS Project... i would like to include e-mail

i could really use some direction on which way is the best method

from herewasplato

BMail

Func SendIt()
    $S_bmail = "bmail.exe";full path to bmail.exe
    $S_SMTP_Server_switch = " -s some_server.domain.com"
    $S_TO_address = " -t some_alias@domain.com"
    $S_FROM_address = " -f AutoIt-Bmail"
    $S_Text_Subject = ' -a "some subject line text"'
    $S_Text_Body = ' -b "some body text"'
    Run($S_bmail & $S_SMTP_Server_switch & $S_TO_address & $S_FROM_address & $S_Text_Subject & $S_Text_Body)
    

EndFunc ;==>SendIt

from MSLx Fanboy / Michel Claveau... made a shorter version

CDO.message

;=============================================================
; Global Settings
$smtpserver = "";smtp server address (i.e. mail.server.com)
$smtpuser = "";smtp username (i.e. john_doe)
$smtppass = "";smtp password (i.e. my_s3cret_P@$$)
;
;=============================================================

Func SendEmail($e_Sender, $e_Recipient, $e_Subject, $e_Text)
    $objMessage = ObjCreate ("CDO.Message")
    With $objMessage
        .Subject = $e_Subject
        .Sender = $e_Sender
        .From = $e_Sender
        .To = $e_Recipient
        .TextBody = $e_text
   ;.AddAttachment ("");Needs FULL path!!!
    EndWith
    With $objMessage.Configuration.Fields
        .Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $smtpserver
        .Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
        .Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $smtpuser
        .Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $smtppass
        .Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        .Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
        .Update
    EndWith
    $objMessage.Send
    Return
EndFunc ;==>SendEmail


;;Error handler functions in case there was an error with email
Dim $oMyError = ObjEvent ("AutoIt.Error", "ErrorHandler")
Func ErrorHandler()
    
    $HexNumber = Hex($oMyError.number, 8)
    
    MsgBox(0, "", "We intercepted a COM Error !" & @CRLF & @CRLF & _
            "err.description is: " & @TAB & $oMyError.description & @CRLF & _
            "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _
            "err.number is: " & @TAB & $HexNumber & @CRLF & _
            "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _
            "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _
            "err.source is: " & @TAB & $oMyError.source & @CRLF & _
            "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _
            "err.helpcontext is: " & @TAB & $oMyError.helpcontext _
            )
    
    SetError(1); to check for after this function returns
    Exit
EndFunc ;==>ErrorHandler

from Felix N

Blat.exe

Func email()
$SMTPADD="your server address"
$SUBJECT="your subject"
$body="your message"
$TO="recipent email address"
$f="your email address"
$body=$stringwrite1
$log="log.txt"


Run("blat.exe -server """ & $SMTPADD & """ -s """ & $SUBJECT & """ -body """ & $BODY & """ -t """ & $TO & """ -f """ & $f & """ -log """& $log & """","" , @SW_HIDE )

endfunc

Larry has sent e-mail through TCP with attachments... i would'nt want to overload our chat server.. buts its still an idea

because this will be placed on the end users computer... is there a way to use autoit code to automatically find the "mail system" used by the end users computer????

any help would be appreciated

thanks

Valuater

8)

NEWHeader1.png

Posted

ok, well the inet.au3 are functions that were written to help with interent stuff

if you look in the client, about function you'll see _INetMail

which opens the default e-mail app on the users computer.

I used that in conjuction with a hyperlink label, also created a hyperlink image using the bmp that i created.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

btw, your last post with the script for the client was cut off, think only so many lines can be put in code box

you'll have to do attachment.

ok..

i cut-out that post and will re-post with your updated code and mine combined

secondly... inet

aol is my "main" email... the inet pulls up Outlook????

i never use outlook... but i wanted to test it and look for 30 minutes( this is going to sound real DUMB )

trying to get/find the "send" button... for proof, here the gui

??????.... man i feel stupid!

8)

Edited by Valuater

NEWHeader1.png

Posted

trying to get/find the "send" button...

You might be able to hit a keyboard shortcut like Ctrl+Enter, or otherwise there should be something in the File or Actions menus.
Posted

ok...

per gafrost i tried the tools, customize, commands....nada

per LxP i tried File or Actions menus..... nada

i had hope when i pressed "Ctrl+Enter", the screen disappeared... but after waiting 15 minutes... nada in my mail box

also

i would like to send the e-mail hidden... is that possible???

8)

NEWHeader1.png

Posted

You could use VBScript, I wrote something a while back, but some mod or admin edited it to not work. But that may cause some virus alarms to go off since it's VBScript

Posted

A CDO object is probably the test way to go, its all automated, no human interaction or external files required, and it can be customized by the user (the settings).

If you do use that code snippet above, you may want to remove that MsgBox error handler in the final release

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

...i never use outlook...

...trying to get/find the "send" button...

Google (outlook "no send button") and you get a lot of returns.

It seems that many things can cause this:

http://www.outlookmarket.com/faq/outlookto...px#nosendbutton

93.) I have no Send button in my Outlook 2003.

The Send button doesn't appear until you create a valid email account.

Other flavors of outlook - like outlook express might - have to be the default client before you get that button. Either way, I would think that you would have to tell whatever flavor of outlook that you have what server to send the email thru... if you "never use outlook" then perhaps this was never done.

later.....

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Hey Valuater, in part of the AutoIt ITS project I am developing an SMTP server and POP3 Internet Mail server which will have clients, but I am first making a client, not sure if it is all possible but will pm you will sending email example real soon. B)

Posted

Hey Valuater, in part of the AutoIt ITS project I am developing an SMTP server and POP3 Internet Mail server which will have clients, but I am first making a client, not sure if it is all possible but will pm you will sending email example real soon. B)

great!!!

and thanks... MLSx Fanboy and herewasplato

8)

NEWHeader1.png

Posted

its the same as with php's mail() function, its pretty hard to know.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

I just realized..I downloaded an auto it mail program that sends mail to mx1 yahoo without login or password. Ouch. How do I know someone is not using that to send email from my account as well? B)

which program is that... i would like to check it out??

thx

8)

NEWHeader1.png

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
  • Recently Browsing   0 members

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