Auto Send Email with MailEnable in ASP problem

Posted on 2005-02-25
Medium Priority
Last Modified: 2012-06-27
I'm using MailEnable as my email server. It is the relay setting causing the error.

Currently, I only allow authenticated sender to send emails..

And I can send email to myself (admin@mydomain.com).
It wouldn't allow to send email to external email service such as yahoo or hotmail

Then I edit the relay setting to "allow local address senders" to send emails. Everything works fine.

If allow this option, then I will have a security issue. I have learned my lesson well, people used my email server to send spam emails.

what are the ways to go around it? Thanks.

Here is the ASP code that autosends email..
sch = "http://schemas.microsoft.com/cdo/configuration/
Set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "<mail.mydomain.com>"

Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "admin@mydomain.com"
cdoMessage.To = "tester@hotmail.com"
cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.TextBody = "This is a test for CDONTS message"
Set cdoMessage = Nothing
Set cdoConfig = Nothing
response.write "Email sent"
Question by:Discusman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 13410074

Plz delete this message since this is a bug issue with MailEnable. Hence, no solution for this problem.

LVL 13

Expert Comment

ID: 13410801
no points :)

but you can try like this
once you entered username and password, you will be able to send to hotmail,yahoo etc ...

     Dim objCDOConf,objCDOSYS
     Set objCDOSYS = Server.CreateObject("CDO.Message")
     Set objCDOConf = Server.CreateObject ("CDO.Configuration")
     With objCDOConf
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mydomain.com"
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "myusername"
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypass"
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
     End With
     Set objCDOSYS.Configuration = objCDOConf

     With objCDOSYS    
          .From = "from@myemail.com"
          .To = "me@mymail.com"
          .Subject = "Subject comes here"
          '.HTMLBody = strMailBody
          .TextBody = "Test message"
     End with                    
     Set objCDOSYS = Nothing

Accepted Solution

ee_ai_construct earned 0 total points
ID: 13411869
Question answered by asker or dialog deemed valuable.
Closed, 125 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question