1
Is anyone using the API with ASP Classic ? Does it work with ASP Classic ? Or does it require ASP.net or something else ?
Question asked by Curtis Kropar www.HawaiianHope.org - 2/27/2024 at 1:19 AM
Unanswered
Subject is pretty much the whole question.
We have several websites, and even a full back office data system built with ASP Classic.  We plan to eventually update, but not right now.

I would like to integrate SmarterMail (build 8797) for the contact forms and communications to use the SmarterMail API to send the emails and take advantage of smartermail signing the emails.

So, Does anyone currently use ASP Classic with the smartermail API ?  will it work and can someone give me a sample code ?
Or, do I need to use ASP.net for it to work, and is there a sample cod for it ? a basic "send mail"
Or, does the API need to be used by another language ?

www.HawaiianHope.org - Providing technology services to non profit organizations, low income families, homeless shelters, clean and sober houses and prisoner reentry programs. Since 2015, We have refurbished over 11,000 Computers !

7 Replies

Reply to Thread
0
J. LaDow Replied
Most of our customer client sites are ClassicASP running on a separate web server and they use CDOSYS (IIS-SMTP) to open a connection to our SmarterMail server as any old "SMTP Client" -- authentication is possible, and TLS can be used as well in this setup if your mail server responds with a valid certificate.

I have a ton of ClassicASP code that accomplishes this but it's part of a mini-framework used for client websites and would take a little "cleanup" to send you samples.

If you setup basically a blank .ASP page, and add Server.CreateObject("CDO.Message") and run it -- if it doesn't throw an exception, you have all you need (other than some code) to have SMTP via ClassicASP.

CDO uses a Message and Configuration object to function properly - both are needed.
MailEnable survivor / convert --
1
YS Tech Replied
You don't need to use the API to send from a classic asp form, all you are sending to is an email account after all. Use either CDO as J. Ladlow has suggested or a server component like Persits ASPEmail.

If you wish to use the API to populate and unpopulate a mailing list then you can do this with ClassicASP, I have a few sites that do this still. Then you can use your form to send to that mailing list.
1
We have been using the CDOSYS for 15+ years to send messages. The problem is they are getting kicked from gmail and others because gmail is looking for domain verification. If we are just sending to our own server they all work fine. But when sending to gmail and some others they get bounced.

Also, AS I understand it, If we use the API then the sent emails will end up in the sent items folder, yes ?  This way we can more easily track what was sent and by who
www.HawaiianHope.org - Providing technology services to non profit organizations, low income families, homeless shelters, clean and sober houses and prisoner reentry programs. Since 2015, We have refurbished over 11,000 Computers !
0
J. LaDow Replied
I must've misunderstood -- 

On our configuration, we use CDOSYS via network, connect from our web server to our mail server via SMTP and initiate a send. Our SM server packages up the email and spools it as if it was sent from webmail or a client - and that keeps us from having any signing issues because our signing is done by the SM server.

It sounds to me like your current configuration has your websites contacting outside mailservers directly - whereas the method we use routes EVERYTHING from our web servers through our SM install. We do this primarily because of the signing and security limitations of the IIS SMTP module (which CDOSYS uses depending on your configuration).

Sorry if I overstepped and never meant to insult previous knowledge.


MailEnable survivor / convert --
0
No insult perceived. Open Exchange of knowledge is how we solve problems.
Well, apparently there is more than one way to use CDO and I might be doing it "wrong" - 

What you described is what I want to do. (do sent emails end up in your sent folder ?) 
What we have now is not doing that. 
Our mail server and web server are the same machine (for now) until we grow this a bit more.

This is essentially what we are doing : Is there a better way ? I have not changed this code in like 12 years.

          Dim ObjSendMail
          Set ObjSendMail       = server.CreateObject("CDO.Message") 
          strError              = ""
          strSendFromMailServer = "mail.AwesomeDomain.com"
          strSendFromEmail      = "CoolMail@AwesomeDomain.com"
          strSendFromPassword   = "FBI_kine_Encrypted_password"
               
          'This section provides the configuration information for the remote SMTP server.
               
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing";)              = 2
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver";)             = strSendFromMailServer
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport";)         = 25 
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl";)             = False
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout";)  = 60
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate";)       = 1 'basic (clear-text) authentication
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername";)           = strSendFromEmail
          ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword";)           = strSendFromPassword
               
          ObjSendMail.Configuration.Fields.Update
              
          ObjSendMail.To        = strEmailAddress
          ObjSendMail.Subject   = strSubject
          ObjSendMail.From      = strSendFromEmail
          ObjSendMail.Bcc       = strSendFromEmail

          ObjSendMail.TextBody  = strMessage

          On Error Resume Next
               
          ObjSendMail.Send
www.HawaiianHope.org - Providing technology services to non profit organizations, low income families, homeless shelters, clean and sober houses and prisoner reentry programs. Since 2015, We have refurbished over 11,000 Computers !
0
Gene Kendrick Replied
I still do it in 2024. lol... but the ice is getting thinner. I used to send via inetpub/mailroot/ folders in conjunction with a Gmail account. They shut that down. Now, I send using smtp.sendgrid.net. I had to set some DNS records on the domain side (mydomain.com) to get it to work.

I received an email from SendGrid 3 days ago saying Gmail will be enforcing new requirements in 4/2024. If I understood it right SendGrid basically said it will affect those that don't have the required DNS records set up, but I could be wrong or missed something in my interpretation. So, we will see. 

If it is the final blow for me, I think a rewrite in something else is my only option. In what I don't know.

0
YS Tech Replied
I still have classic asp sites running for clients (they don't want to change as the sites work for them!). I am gradually porting the sites over to php/javascript. It's the closest language I could learn quickly ;o)

Reply to Thread