email with attachments

This forum is for eXpress++ general support.
Post Reply
Message
Author
bobvolz
Posts: 117
Joined: Sun Jan 31, 2010 11:25 am

email with attachments

#1 Post 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

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: email with attachments

#2 Post 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
The eXpress train is coming - and it has more cars.

bobvolz
Posts: 117
Joined: Sun Jan 31, 2010 11:25 am

Re: email with attachments

#3 Post 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

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: email with attachments

#4 Post 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.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: email with attachments

#5 Post 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
greetings by OHR
Jimmy

bobvolz
Posts: 117
Joined: Sun Jan 31, 2010 11:25 am

Re: email with attachments

#6 Post by bobvolz »

Thanks Jimmy.
I will try it.

Bob Volz

Post Reply