cobasystems EMAIL via AutoIt
- cobasystems
- Posts: 15
- Joined: Wed Nov 12, 2014 4:44 pm
cobasystems EMAIL via AutoIt
Alaska Xbase ++ and eXpress ++ version 1.9 library Asinet have an email client that supports SSL encryption. This support has been introduced only in version 2.0 or version 1.9 users do not have it. For this reason, work with version 1.9 used in a variety of solutions, and the most commonly used ActiveX Controls.
I am here used the Windows CDO CDOSYS.DLL ActiveX control that urge from EXE program eMailAutoit.exe written in free Windows script language AutoIt. Complete project and source code for autoit program eMailAutoit.exe I gave in the file:
Alaska Xbase++ EMAIL autoit.zip
https://onedrive.live.com/redir.aspx?ci ... J3Rk2dc3Kw
In this file is located and AutoIt program, and the story of AutoIt program and instructions for working with Autoit tool, and an explanation as to why I believe that programs directly related to the Windows API to write from Autoit Windows script languages.
Its operation is as follows:
SENDING MAIL
Xbase ++ / eXpress ++ application make data and text for mail and all recorded in a plain text file EMAIL.TXT
Then Xbase ++ / eXpress ++ application calls the external program eMailAutoit.exe which loads data from a text file EMAIL.TXT and send them as a mail recipient.
SETTING MAIL SERVER
Xbase ++ / eXpress ++ application calls the external program eMailAutoitConfig.exe which open dialogue for data entry:
- the name of the SMTP mail server,
- port number,
- mail address of the sender
- mail address of the sender to which it sends copies of sent mail,
- username for the mail server
- password for the mail server
- SSL connection Yes / No
The registered information enroll in the Windows registry database.
When Xbase ++ / eXpress ++ application calls the external program eMailAutoit.exe he loaded the data from the Windows registry and uses them to send mail to the recipient. If this information is incorrect mail will be sent.
Complete project and source code for Xbase ++ / eXpress ++ program with eMailAutoit.exe I gave in the file:
Alaska Xbase++ EMAIL via autoit.zip
https://onedrive.live.com/redir.aspx?ci ... 392Bp7K4pY
I am here used the Windows CDO CDOSYS.DLL ActiveX control that urge from EXE program eMailAutoit.exe written in free Windows script language AutoIt. Complete project and source code for autoit program eMailAutoit.exe I gave in the file:
Alaska Xbase++ EMAIL autoit.zip
https://onedrive.live.com/redir.aspx?ci ... J3Rk2dc3Kw
In this file is located and AutoIt program, and the story of AutoIt program and instructions for working with Autoit tool, and an explanation as to why I believe that programs directly related to the Windows API to write from Autoit Windows script languages.
Its operation is as follows:
SENDING MAIL
Xbase ++ / eXpress ++ application make data and text for mail and all recorded in a plain text file EMAIL.TXT
Then Xbase ++ / eXpress ++ application calls the external program eMailAutoit.exe which loads data from a text file EMAIL.TXT and send them as a mail recipient.
SETTING MAIL SERVER
Xbase ++ / eXpress ++ application calls the external program eMailAutoitConfig.exe which open dialogue for data entry:
- the name of the SMTP mail server,
- port number,
- mail address of the sender
- mail address of the sender to which it sends copies of sent mail,
- username for the mail server
- password for the mail server
- SSL connection Yes / No
The registered information enroll in the Windows registry database.
When Xbase ++ / eXpress ++ application calls the external program eMailAutoit.exe he loaded the data from the Windows registry and uses them to send mail to the recipient. If this information is incorrect mail will be sent.
Complete project and source code for Xbase ++ / eXpress ++ program with eMailAutoit.exe I gave in the file:
Alaska Xbase++ EMAIL via autoit.zip
https://onedrive.live.com/redir.aspx?ci ... 392Bp7K4pY
Re: cobasystems EMAIL via AutoIt
hi,
ZIP File need Password ???
i wonder why you use AutoIt for CDO while you can use it direct with Xbase++
ZIP File need Password ???
i wonder why you use AutoIt for CDO while you can use it direct with Xbase++
Code: Select all
#include "Gra.ch"
#include "Xbp.ch"
#include "Common.ch"
#include "os.ch"
#pragma library( "ascom10.lib" )
PROCEDURE MAIN
LOCAL oCdoMessage
LOCAL oCdoConf
LOCAL cFromTo
oCdoMessage := CreateObject("CDO.Message")
oCdoConf := CreateObject("CDO.Configuration")
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusing",2)
// this is for "WEB.DE"
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.web.de")
// Port 25 or 587 or other depend on Provider
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25)
* oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserverport", 587)
// SSL
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpusessl", 1)
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusername", "USERNAME")
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendpassword", "USERPASSWORD")
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60)
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1)
oCdoConf:fields:callMethod("Update")
oCdoMessage:Configuration := oCdoConf
oCdoMessage:Subject := "CDO Beispiel"
// send FROM -> TO
oCdoMessage:setproperty("From", "XXX@web.de")
oCdoMessage:setproperty("To", "ZZZ@T-ONLINE.de")
oCdoMessage:TextBody := "von WEB.DE Bla bla bla. "+OS(OS_VERSION)
oCdoMessage:Send()
WAIT
RETURN
greetings by OHR
Jimmy
Jimmy
- cobasystems
- Posts: 15
- Joined: Wed Nov 12, 2014 4:44 pm
Re: cobasystems EMAIL via AutoIt
password for all my zip files is: cobasystems
Re: cobasystems EMAIL via CDO
Hi,
I was trying to use the below code, but it doesn't work. Anyone who is using the CDOsys.dll for sending emails? It looks easy, but apparently it isn't.
The error is: the transport failed to connect to the server. I checked Google, and it seems that this is something rather common. It looks as there is never a real concrete answer to this. Same code is working on different PC's and on some it doesn't.
Is there someone who is successfully using CDO for sending mail?
I was trying to use the below code, but it doesn't work. Anyone who is using the CDOsys.dll for sending emails? It looks easy, but apparently it isn't.
The error is: the transport failed to connect to the server. I checked Google, and it seems that this is something rather common. It looks as there is never a real concrete answer to this. Same code is working on different PC's and on some it doesn't.
Is there someone who is successfully using CDO for sending mail?
Auge_Ohr wrote:hi,
i wonder why you use AutoIt for CDO while you can use it direct with Xbase++Code: Select all
#include "Gra.ch" #include "Xbp.ch" #include "Common.ch" #include "os.ch" #pragma library( "ascom10.lib" ) PROCEDURE MAIN LOCAL oCdoMessage LOCAL oCdoConf LOCAL cFromTo oCdoMessage := CreateObject("CDO.Message") oCdoConf := CreateObject("CDO.Configuration") oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusing",2) // this is for "WEB.DE" oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.web.de") // Port 25 or 587 or other depend on Provider oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25) * oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserverport", 587) // SSL oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpusessl", 1) oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusername", "USERNAME") oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendpassword", "USERPASSWORD") oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60) oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1) oCdoConf:fields:callMethod("Update") oCdoMessage:Configuration := oCdoConf oCdoMessage:Subject := "CDO Beispiel" // send FROM -> TO oCdoMessage:setproperty("From", "XXX@web.de") oCdoMessage:setproperty("To", "ZZZ@T-ONLINE.de") oCdoMessage:TextBody := "von WEB.DE Bla bla bla. "+OS(OS_VERSION) oCdoMessage:Send() WAIT RETURN
Re: cobasystems EMAIL via CDO
i use it every Dayskiman wrote:I was trying to use the below code, but it doesn't work.
you have to find out which Port your Provider need. it might be 578 for SSL but NOT 25
you do not need any DLL ... it is Windows itself who have CDO.skiman wrote:Anyone who is using the CDOsys.dll for sending emails? It looks easy, but apparently it isn't.
greetings by OHR
Jimmy
Jimmy
Re: cobasystems EMAIL via AutoIt
Jimmy,
It is very important, is this possible also for sending attach files in mails ?
And works with Foundation version of Alaska Xbase++ ?
It is very important, is this possible also for sending attach files in mails ?
And works with Foundation version of Alaska Xbase++ ?
Re: cobasystems EMAIL via AutoIt
YESVictorio wrote:It is very important, is this possible also for sending attach files in mails ?
Code: Select all
oCdoAdd := oCdoMessage:AddAttachment("D:\TEST\Test.DOC")
oCdoAdd:ContentMediaType := "application/msword"
it is Windows so it work with every Programming Language which can use COM / activeX InterfaceVictorio wrote:And works with Foundation version of Alaska Xbase++ ?
greetings by OHR
Jimmy
Jimmy
Re: cobasystems EMAIL via AutoIt
Superr, I must try it tnx
Re: cobasystems EMAIL via CDO
Hi Jimmy,Auge_Ohr wrote:i use it every Dayskiman wrote:I was trying to use the below code, but it doesn't work.
you have to find out which Port your Provider need. it might be 578 for SSL but NOT 25
you do not need any DLL ... it is Windows itself who have CDO.skiman wrote:Anyone who is using the CDOsys.dll for sending emails? It looks easy, but apparently it isn't.
If I test the port I use with xbsee library with portqry it is 'listening'. I'm using port 578, which is working with xbsee.
I tested now with port 25, and the mail was send.
Both tests have been done with the same .EXE, to be sure that my application isn't blocked by some software.
Apparently it is a port issue. I will give the option in my application, mail by CDO or mail by xbsee.
Re: cobasystems EMAIL via AutoIt
When I use Chilkat_9_5_0.Mailman ActiveX for smtp I use port 465 for Gmail.
Also, Chilkat has a logical value that must be set to enable SSL:
Is it possible that your CDO control also has such a requirement?
Also, Chilkat has a logical value that must be set to enable SSL:
Code: Select all
oMailman := CreateObject('Chilkat_9_5_0.MailMan')
* Any string argument automatically begins the 30-day trial.
nSuccess := oMailman:UnlockComponent("30-day trial")
IF (nSuccess <> 1)
DCMSGBOX oMailman:LastErrorText
QUIT
ENDIF
* Set the SMTP server.
oMailman:SmtpHost = "smtp.gmail.com"
oMailman:SmtpUsername := ''
oMailman:SmtpPassword := ''
oMailman:SmtpSsl := 1
oMailman:SmtpPort := 465
The eXpress train is coming - and it has more cars.