Sign in to follow this  
Followers 0
FastHelper

sending email from my autoit program

12 posts in this topic

i want that if someone will press F2 then my program will send a text report to email address of mine.

i have no idea about it. just trying to know.

If _IsPressed("71", $dll) Then
        MsgBox(0,"_IsPressed", "Report will be Sent Now")
        What Should i input here to send the email ?

sorry for my spelling mistakes. its due to be fast !!!

Share this post


Link to post
Share on other sites



What do u intend on using this for?

Share this post


Link to post
Share on other sites

this will send message of user to me.


sorry for my spelling mistakes. its due to be fast !!!

Share this post


Link to post
Share on other sites

Use the UDF where you posted something like "Gives error" and code it properly. Then when it still fails post the problem with all details to be able to assist you.

Jos

Ps it better be a legitimate reason for wanting this :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I simply used _tcpConnect ect.

se documentation on wikipedia under the "TCP" voice XD

it shows you how to send an email using port 25 :)


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

Hi.

this will send message of user to me.

IIRC there is a UDF out here to send emails.

You can also use "BLAT.EXE" (Google), a powerful CMD line email sending program, that also can attach files. I make frequent use of this to monitor scheduled tasks and to send an email with the LOGs to "me@mydomain.com" from "task@customer.com" with Prio=Low for success and Prio=high for fails.

BLAT.EXE and such questions like yours are always suspect: The intention of asking / using might be malicious (mail botting) :)

I assume, that your intention is like mine: error tracking, not malicious intention :)


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

yes my purpose was like yours but a little bit different but something like that not for bad purpose :)

i am new so i was just trying to get the idea now i will work on it and if got any problem then will post here.

thanks for your help. please give me a example if possible.


sorry for my spelling mistakes. its due to be fast !!!

Share this post


Link to post
Share on other sites

yes my purpose was like yours but a little bit different but something like that not for bad purpose :)

i am new so i was just trying to get the idea now i will work on it and if got any problem then will post here.

thanks for your help. please give me a example if possible.

Use the search function ^^ up there. Type email in the box and untick search this forum only. There are at least 2 examples if not more on the first page of results!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Hi.

please give me a example if possible.

this is an untested, QND extract from one of my monitoring scripts. Don't forget to drop BLAT.EXE somewhere in your PATH. I personally have it in @systemroot or \\server\sys\public\ :)

#cs sample extract
    use BLAT.EXE for sending status emails to some admin@support.xy
    used with Autoit3.2.10.0 so far (3.2.12.0 should be fine)
#ce Enjoy! Rudi.


; do whatever you need to do:
$result = RunWait("SomeProgram.exe") ; $result will hold the exitcode of that prog (%errorlevel%)

Select
    Case $result = 0
        ; everything OK
        Blatter()
        Run('blat.exe C:\path\to\your\LogFile.txt -to monitoring@yourdomain.com -subject "Job XY successfully completed" -priority 0')
        
    Case $result = 1
        ; something went wrong
        Blatter()
        Run('blat.exe C:\path\to\your\LogFile.txt -to monitoring@yourdomain.com -subject "Job XY completed with warnings" -priority 1')

    Case $result = 2
        ; something else went wrong
        Blatter()
        Run('blat.exe C:\path\to\your\LogFile.txt -to monitoring@yourdomain.com -subject "Job XY completet with errors" -priority 1')

    Case Else
        ; something not covered above went wrong
        Blatter()
        Run('blat.exe C:\path\to\your\LogFile.txt -to monitoring@yourdomain.com -subject "Job XY terminated with an unexpected Exit Code: ' & $result & '" -priority 1')
EndSelect


; set receiving SMTP server and sending user
Func Blatter()
    RunWait("blat -install mail.yourdomain.com task@customer.com")
EndFunc   ;==>Blatter

regards, rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

I simply used _tcpConnect ect.

se documentation on wikipedia under the "TCP" voice XD

it shows you how to send an email using port 25 :)

Sorry it's the SMTP voice in wikipedia XD


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

You could use _INetSmtpMail

Share this post


Link to post
Share on other sites

You could use _INetSmtpMail

_INetSmtpMail() can't send attachments so far, right? (3.2.12.0)

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0