Page 1 of 1

email with attachments

Posted: Sat Oct 04, 2014 8:11 am
by bobvolz
I use ASINET email functions throughout my program to send messages and attachements. Recently Verizon changed their smtp server sites and have had lots of issues. I was using port 25 and sent a valid user name and password to access their smtp server. I was able to attach txt or pdf files without a problem. I did not have to set SSL or TTL. Now I can only send an email with this setup . If there is an attachment the system hangs.

As a point of reference I had similar issues with my in house copiers using Verizon. I have switched to smtp.Gmail.com and it works fine. However, on these devices I can set SSL or TTL as part of the setup.

I have tried using the smtp.Gmail server for my xBase++ program but it appears that you must select SSL or TTL as well. I cannot access their server at all on any port 465, 587 or 25. I have allowed less secure apps though my gmail account. That is how I got the copier to work.

There does not appear to be an option setting property for SSL in ASINET.

I was wondering if anyone else has this problem and if they had a solution.
Thanks,
Bob Volz

Re: email with attachments

Posted: Sat Oct 04, 2014 8:49 am
by rdonnay
Bob -

You are right about no SSL support in ASINET.

I had to use STUNNEL to do this.

Are you going to be in Phoenix this year?
I will show you how I did it when I see you.

Roger

Re: email with attachments

Posted: Sat Oct 04, 2014 9:37 am
by bobvolz
Hi Roger;

Yes I will be there. Looking forward to it. Bobby said you might have a task scheduler as well.

Let me know.

Bob Volz

Re: email with attachments

Posted: Mon Oct 06, 2014 4:09 am
by Cliff Wiernik
Xbase 2.0 is supposed to handle authenticated email using other ports and TLS/SSL. At least based on what I they told me when I encountered a similar issue with an in-house exchange server at a client. Exchange 2012 by default only allowed the encrypted TLS/SSL approach. A new receive connector allowing std port 25 connections was required.

Also, the chilkat activeX library, rather inexpensive, appears to also allow this type of connections. I have the library but did not test it because the client addressed the issue prior to having to test it.

Re: email with attachments

Posted: Mon Oct 06, 2014 7:46 pm
by Auge_Ohr
hi,

you can use CDO to send Mail with SSL

Code: Select all

#pragma library( "ascom10.lib" )

PROCEDURE MAIN
LOCAL oCdoMessage
LOCAL oCdoConf

oCdoMessage := CreateObject("CDO.Message")
oCdoConf    := CreateObject("CDO.Configuration")

// cdoSendUsingPort = 2
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusing",2)
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserver", "yourSMTP.COM")

// configure your Port
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpserverport", 587)
// SSL 0/1
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpusessl", 1)

oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 60)

// cdoBasic = 1
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1)
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendusername", "auge_ohr")
oCdoConf:fields:setproperty("item","http://schemas.microsoft.com/cdo/configuration/sendpassword", "****")

oCdoConf:fields:callMethod("Update")

oCdoMessage:Configuration := oCdoConf
oCdoMessage:Subject := "CDO Sample"
oCdoMessage:setproperty("From", "AUGE_OHR@xxx.xxx")
oCdoMessage:setproperty("To", "Receiver@yyy.yyy")
oCdoMessage:TextBody := "send with CDO and SSL, have fun"

if !Empty(aAttachment)
   nLen := Len(aAttachment)
   for nInd := 1 to nLen
       oCdoMessage:AddAttachment(aAttachment[nInd])
   next
endif
           
oCdoMessage:Send()

WAIT

oCdoMessage:Destroy()
oCdoConf:Destroy()
RETURN

Re: email with attachments

Posted: Sun Oct 12, 2014 11:24 pm
by bobvolz
Thanks Jimmy.
I will try it.

Bob Volz