Jump to content

_EmailSend() Func. Ready to use.


ezzetabi
 Share

Recommended Posts

Couldn't you just use AutoIt3Beta's TCP functions? I'm writing an email client (don't know why, just felt like it) and I will compile it using the Beta versions because they have TCP functions. So what about...

#ce
     Paul Callender's TCP SMTP SEND function (really rough, 5min job, needs rewriting)
#cs

Func _EmailSend($sFrom,$sTo,$sBodyContent,$sSubject)
TCPStartup()
$SMTP_HOST_NAME = IniRead(@MyDocumentsDir&"\My Settings.ini","_EmailSend()","SMTPHost","smtp.isp-host-domain.com")
$SMTP_HOST_IP = TCPNameToIP($SMTP_HOST_NAME)

$connect = TCPConnect($SMTP_HOST_IP,"25")
TCPSend($connect,"HELO "&@UserName&"."&@ComputerName&".lan"&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"MAIL FROM: "&$sFrom&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"RCPT TO: "&$sTo&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"DATA"&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"Subject: "&$sSubject&@CRLF&@CRLF&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,$sBodyContent&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"."&@CRLF)
TCPRecv($connect,512)
TCPSend($connect,"QUIT")
TCPRecv($connect,512)
TCPCloseSocket($connect)
TCPShutdown()

Something like that? (please check...)

[size="4"]YOU SHALL NOT PARSE!![/size]
Link to comment
Share on other sites

  • 4 months later...
  • Replies 83
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hey,

saw ur mailer and thought it was awesome......but i need help setting it up....u wanna help? ide very much appreciate it just leave a comment of how and what to do plz? if not then i guess il find out 4 myself but if u do then thx in advance..

-E|2ic-

Link to comment
Share on other sites

  • 3 weeks later...
  • Developers

Is there any way to use this _EmailSend() function with smtp servers using secured connexion (ssl, tls...) ?

I currently get this response of the smtp server :

"the SMTP server did not accept Auth plain value" ....

What should i do ? :nuke:

thanks for ur help !

Look for _INetSmtpMailCom() in the Scripts&Scraps..

:P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

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