SMTP with Outlook
SMTP with Outlook
Hello,
I want to send an eMail with TD 6.3. Email has attached a small zip-file.
Can I use SMTP over Outlook? Or should I use other protocols?
In my Developer VM I use Firebird with SMTP, the demo app works (as far I'm looking for a more simple solution as QuickMail)
But I have to set user/pw. That's not good because if customer changes his windows pw, outlook works but the app doesn't work anymore.
Maybe I have to use MAPI because Outlook will accept any mail from the same Computer/Windows session as it's running.
Any idea?
thanks
Jürgen
I want to send an eMail with TD 6.3. Email has attached a small zip-file.
Can I use SMTP over Outlook? Or should I use other protocols?
In my Developer VM I use Firebird with SMTP, the demo app works (as far I'm looking for a more simple solution as QuickMail)
But I have to set user/pw. That's not good because if customer changes his windows pw, outlook works but the app doesn't work anymore.
Maybe I have to use MAPI because Outlook will accept any mail from the same Computer/Windows session as it's running.
Any idea?
thanks
Jürgen
Re: SMTP with Outlook
AFAIK, the only way you can accomplish it is with MAPI.
I don't know of any other way.
I've been using MAPI for over 15 years now without any problems.
The pros are that the user can see the email before sending and to have it in his sent folder.
The cons are that the user have to dismiss two dialog boxes with a permission to send it.
For automated emails I am using SMTP with the default e-mail account in the BCC field.
I don't know of any other way.
I've been using MAPI for over 15 years now without any problems.
The pros are that the user can see the email before sending and to have it in his sent folder.
The cons are that the user have to dismiss two dialog boxes with a permission to send it.
For automated emails I am using SMTP with the default e-mail account in the BCC field.
Igor Ivanovic


Re: SMTP with Outlook
We use SalMail.apl for some time now. Works perfectly, even with Attachments.
Re: SMTP with Outlook
@ Didiman: in the help is written you need a CA file, really? Can I use the same user and pw as user is logged in without hard coding his password? Or should I use another eMail-account especially for sending the mail?
Can I use SalMail with SMTP to connect to an Exchange Server? Outlook is not really necessary on the Client, because the SalMailXX.dll will do the work.
thanks
Jürgen
Can I use SalMail with SMTP to connect to an Exchange Server? Outlook is not really necessary on the Client, because the SalMailXX.dll will do the work.
thanks
Jürgen
Re: SMTP with Outlook
This is pretty simple, you can easily send an EMail like this:
You need nothing else.
Receiving works like this:
greetz
--Andreas
Code: Select all
!!CB!! 70
SalMail: fcMail
Set bOk = TRUE
!
Call fcMail.SetMailServer( dfsSMTPServer, 0, FALSE, TRUE )
Call fcMail.Connect( )
Set sGlobAttachments = sFilename || ';' || sGlobAttachments
Call fcMail.SendMail( MAIL_FORMAT_PLAIN_TEXT , dfsBetreff, cmbAbsender, cmbEmpfänger, cmbCC, 'Anbei die angeforderten Daten', sGlobAttachments, FALSE, 1 )
!
Call fcMail.Disconnect( )
!
!
Return bOk
Receiving works like this:
Code: Select all
!!CB!! 70
Set bFirst = TRUE
Call cMail.SetMailServer(sIMAPServer, 0, FALSE, FALSE)
Call cMail.SetUser( sMailUser,sMailPassword )
Call cMail.Connect( )
Set _nCounter = 0
Set nMailFormat = 0
If cMail.GetNextMail( bFirst, nMailFormat,nMailID, sDateReceived, sSubject, sOriginator, sRecipientsList ,sCarbon, mlsMailbody, sAttachments ) = 0
If sAttachments != ''
Set nNumOfTokens = SalStrTokenize( sAttachments, '', ';', sFiles )
While sFiles[_nCounter] != ''
Set _nCounter=_nCounter+1
Call cMail.DeleteMail( nMailID )
!
Call cMail.Disconnect( )
Return TRUE
greetz
--Andreas
Re: SMTP with Outlook
We use different methods for sending mails.
a) our support receives error reports via mail sent by SalMail
b) user can send email via Outlook (MAPI)
c) user can send email via activex component (will not longer supported)
each method has pros and cons. For uncomplicated use I would prefer SalMail because it's small and quickly implemented. No worry about different outlook versions or outlook is not installed. If user interaction is necessary, I would prefer Outlook, otherwise you will need to implement an editor (HTML) as well most users are used to working with Outlook.
a) our support receives error reports via mail sent by SalMail
b) user can send email via Outlook (MAPI)
c) user can send email via activex component (will not longer supported)
each method has pros and cons. For uncomplicated use I would prefer SalMail because it's small and quickly implemented. No worry about different outlook versions or outlook is not installed. If user interaction is necessary, I would prefer Outlook, otherwise you will need to implement an editor (HTML) as well most users are used to working with Outlook.
Re: SMTP with Outlook
You only need the CA file if you are connecting to the email server using SSL, for a regular connection you don't need it.jdurban wrote: ↑09 Oct 2018, 15:14@ Didiman: in the help is written you need a CA file, really? Can I use the same user and pw as user is logged in without hard coding his password? Or should I use another eMail-account especially for sending the mail?
Can I use SalMail with SMTP to connect to an Exchange Server? Outlook is not really necessary on the Client, because the SalMailXX.dll will do the work.
thanks
Jürgen
SalMail will work with any SMTP server, so you need to use the account from the mail server.
It can be the account of the user logged in, but then you will need to know the user/pssw combination for every user which I personally don't like.
You can set the Originator to the user email address, as the originator doesn't have to be the same as the account you are using to send mails.
Igor Ivanovic


Re: SMTP with Outlook
My 2 cents:
Our clients want to see the mails they sent in their sent-mails folder [1].
So we're using Outlook (or Lotus Notes) via COM automation.
For Outlook, I can recommend the excellent Redemption Library [2] (see http://www.dimastr.com/redemption/), which has a very powerful and stable interface to Outlook/MAPI and can also be loaded without being registered (I posted a solution for that somewhere).
HTH & HAND, clem
[1] Bcc'ing them confused them, as the mails got into their Inbox and... well... let's not go there.
[2] I'm not working for them nor am I affiliated with them in any way.
Our clients want to see the mails they sent in their sent-mails folder [1].
So we're using Outlook (or Lotus Notes) via COM automation.
For Outlook, I can recommend the excellent Redemption Library [2] (see http://www.dimastr.com/redemption/), which has a very powerful and stable interface to Outlook/MAPI and can also be loaded without being registered (I posted a solution for that somewhere).
HTH & HAND, clem
[1] Bcc'ing them confused them, as the mails got into their Inbox and... well... let's not go there.
[2] I'm not working for them nor am I affiliated with them in any way.
Re: SMTP with Outlook
thanks for all answers!
I was just a littlebit confused by the Gupta samples app, because it works not without an eMail Client, but after installing firebird it works.
Meanwhile I use SALMail and it works (easily..) with my t-Online (test-) account well and described by Andreas. Without Outlook and anything else...
Only with my own Exchange Server it doesn't work (grrr..), but the reason will be the settings of my ExchangeServer itself.
I was just a littlebit confused by the Gupta samples app, because it works not without an eMail Client, but after installing firebird it works.
Meanwhile I use SALMail and it works (easily..) with my t-Online (test-) account well and described by Andreas. Without Outlook and anything else...
Only with my own Exchange Server it doesn't work (grrr..), but the reason will be the settings of my ExchangeServer itself.
Re: SMTP with Outlook
Hi,
hmm, sending mails with ExchangeServer doesn't work - with t-Online easily (using SALMail).
What's the difference with ExchangeServer and other servers?
I tested servername and IP-address, port is correct, SSL = TRUE, user is set, with or without password.
SendMail return always -1 and no mail was send (I only will send).
Any ideas? What else should I test? Both ExchangeServer runs well and all users in the AD send and receive Mails (with Outlook).
thanks,
Jürgen
hmm, sending mails with ExchangeServer doesn't work - with t-Online easily (using SALMail).
What's the difference with ExchangeServer and other servers?
I tested servername and IP-address, port is correct, SSL = TRUE, user is set, with or without password.
SendMail return always -1 and no mail was send (I only will send).
Any ideas? What else should I test? Both ExchangeServer runs well and all users in the AD send and receive Mails (with Outlook).
thanks,
Jürgen
Re: SMTP with Outlook
T-Online has always SSL = TRUE? Do you have installed a CA-file for SSL support?
Re: SMTP with Outlook
yes, t-Online uses SSL=TRUE, it doesn't work with SSL=FALSE. T-Online uses "STARTTLS, Auth method: Passwort/normal (=Settings of Firebird for t-Online).
There are other methods: no auth, password/normal, encrypted Password, Kerberos / GSSAPI, NTLM, OAuth2.
So, if Exchange forces one of the other Settings I can't connect...?
I don't have installed a CA-file for SSL Support. Maybe Exchange need one but t-Online not?
thanks
There are other methods: no auth, password/normal, encrypted Password, Kerberos / GSSAPI, NTLM, OAuth2.
So, if Exchange forces one of the other Settings I can't connect...?
I don't have installed a CA-file for SSL Support. Maybe Exchange need one but t-Online not?
thanks
Re: SMTP with Outlook
sorry settings where copied from Thunderbird as eMail-client, not Firebird. Thunderbird was installed as test-email client for my T-Online account.
Re: SMTP with Outlook
Now I can send eMails. The problem was that I used SSL because all informations said this. But it works only without SSL.
And second, the special auth-user at customer side does not work at all, I don't know why. But it works with my account. Admin said, both users are "common"....
And second, the special auth-user at customer side does not work at all, I don't know why. But it works with my account. Admin said, both users are "common"....
Who is online
Users browsing this forum: [Ccbot] and 0 guests