Commandline email client with SSL SMTP authentication?
Commandline email client with SSL SMTP authentication?
Hello
I need to send some automatic emails from an email account that need SSL SMTP authentication.
Does anybody knows an email client that can be used from command line to achieve this task?
Thanks in advance.
I need to send some automatic emails from an email account that need SSL SMTP authentication.
Does anybody knows an email client that can be used from command line to achieve this task?
Thanks in advance.
stunnel works from PB
In the stunnel.conf
i add this:
Just installed stunnel as service and now im able to use my smtp with ssl auth. Great!!
Thanks Kale
Code: Select all
StunnelExe$ = "C:\Archivos de programa\stunnel\stunnel.exe"
; RunProgram(StunnelExe$,"-start","")
MySMTPServer.s = "127.0.0.1"
MySMTPPort.l = 1099
MailTo.s = "receiver@mail.com"
MailFrom.s = "mymail@yahoo.com"
Subject.s = "testeando ssl"
MsgBody.s = "veamos"
If PureSMTP_OpenSMTPConnection(MySMTPServer, MySMTPPort) = #PureSMTP_Ok
Debug PureSMTP_GetLastServerMessage()
PureSMTP_AddHeader("X-MSMail-Priority", "High")
PureSMTP_AddHeader("Date", FormatDate("Y=%yyyy, M= %mm, D=%dd", Date()))
Status.l = PureSMTP_SendMail(MailTo, MailFrom, Subject, MsgBody, "","mymail@yahoo.com","password")
Debug PureSMTP_GetLastServerMessage()
PureSMTP_CloseSMTPConnection()
Else
Debug "stunnel not running"
EndIf
; RunProgram(StunnelExe$," -uninstall","")
i add this:
Code: Select all
[SMTP]
accept = 127.0.0.1:1099
connect = plus.smtp.mail.yahoo.com:465
Thanks Kale
Hi ricardo,ricardo wrote:Yes, it does.rsts wrote:That looks cool.
Have to see if it will work with GMail.
Thanks
I know because the example that i use was made for gmail, but i change it for yahoo.
Could you give an example for gmail because i don't arrive to have a connection, with Puresmtp and my account in GMAil
Note i use Mailroam for my four email accounts
Thanks
- Michael Vogel
- Addict
- Posts: 2677
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: Commandline email client with SSL SMTP authentication?
smtp.gmail.comMichael Vogel wrote:Did anyone made a working example for using gmail with (or even without ) stunnel?
Michael
Port normal: 587 or 25
Port SSL : 465
---------------------------------------------
Code: Select all
StunnelExe$ = "C:\Archivos de programa\stunnel\stunnel.exe"
;if OsVersion()=NT/2000/XP meaby
RunProgram(StunnelExe$,"-install","",#PB_Program_Wait)
delay(300)
RunProgram(StunnelExe$,"-start","",#PB_Program_Wait)
delay(300)
;endif
MySMTPServer.s = "127.0.0.1"
MySMTPPort.l = 1099
MailTo.s = "receiver@mail.com"
MailFrom.s = "mymail@yahoo.com"
Subject.s = "testeando ssl"
MsgBody.s = "veamos"
If PureSMTP_OpenSMTPConnection(MySMTPServer, MySMTPPort) = #PureSMTP_Ok
Debug PureSMTP_GetLastServerMessage()
PureSMTP_AddHeader("X-MSMail-Priority", "High")
PureSMTP_AddHeader("Date", FormatDate("Y=%yyyy, M= %mm, D=%dd", Date()))
Status.l = PureSMTP_SendMail(MailTo, MailFrom, Subject, MsgBody, "","mymail@yahoo.com","password")
Debug PureSMTP_GetLastServerMessage()
PureSMTP_CloseSMTPConnection()
Else
Debug "stunnel not running"
EndIf
;if OsVersion()=NT/2000/XP meaby
delay(300)
RunProgram(StunnelExe$," -stop","",#PB_Program_Wait)
delay(300)
RunProgram(StunnelExe$," -uninstall","",#PB_Program_Wait)
;endif
Last edited by Wladek on Wed May 04, 2011 11:52 am, edited 1 time in total.
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: Commandline email client with SSL SMTP authentication?
I know I'm a bit late but msmtp (http://msmtp.sourceforge.net/) is also pretty good.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)
- langinagel
- Enthusiast
- Posts: 131
- Joined: Fri Jan 28, 2005 11:53 pm
- Location: Germany
- Contact:
Re: Commandline email client with SSL SMTP authentication?
Just a question...after quite some times...
Is it possible to build an email client with stunnel and Purebasic in order to
- receive emails from an email server
- just fetch some messages with the correct attachment and
- disregard all other messages not with the correct attachment
???
Best regards
LN
Is it possible to build an email client with stunnel and Purebasic in order to
- receive emails from an email server
- just fetch some messages with the correct attachment and
- disregard all other messages not with the correct attachment
???
Best regards
LN
Re: Commandline email client with SSL SMTP authentication?
I've done it via a python proxy with an up to date CA file..
Bad thing about this thread is how useful it is to anyone with a lot of IPs for launching a highly profitable spam network..
Bad thing about this thread is how useful it is to anyone with a lot of IPs for launching a highly profitable spam network..
The truth hurts.
Re: Commandline email client with SSL SMTP authentication?
Maybe a bit late ...
I compiled libcurl with imap included and replaced the original PB libcurl.lib.
So it is possible to fetch emails via imaps from a server.
I already told Fred that he should include imap, because it only increases the size of the lib by 30k
And the 's' is needed everywhere if you do something via TCP/IP today.
A year ago I already placed it on the wish list:
http://www.purebasic.fr/english/viewtop ... ilit=imaps
Bernd
I compiled libcurl with imap included and replaced the original PB libcurl.lib.
So it is possible to fetch emails via imaps from a server.
I already told Fred that he should include imap, because it only increases the size of the lib by 30k
And the 's' is needed everywhere if you do something via TCP/IP today.
A year ago I already placed it on the wish list:
http://www.purebasic.fr/english/viewtop ... ilit=imaps
Bernd