473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

ASP Help - Sending Email

Not new to programming but new to ASP. The uplink provider decided in their infinite wisdom to block port 25 for everyone and require people to use an alternate port with authentication. Unfortunately I don't know enough to be able to see what is happening to know why this isn't working. Is there a debugging mode I can turn on to step through a script to see the malfunction? Can anyone offer a suggestion as to why this portion of the script isn't working??

Any help is GREATLY appreciated.

Ben

P.S. I didn't write this code, just trying to debug it.

Expand|Select|Wrap|Line Numbers
  1. 'CDO send method
  2.     objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
  3.  
  4.     'Out going SMTP server this can be on any machine
  5.     objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.myhost.com"
  6.  
  7.     'SMTP port
  8.     objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 26
  9.  
  10.     'Timeout
  11.     objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
  12.  
  13.     'SMTP server authentication
  14.      objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  15.      objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "USERNAME@DOMAIN.COM"
  16.      objMailConf.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSWORD"
  17.  
  18.     'Update the CDOSYS Configuration
  19.     objMailConf.Fields.Update
  20.  
  21.     Set objNewMail.Configuration = objMailConf
  22.  
  23.     'Set key properties
  24.     objNewMail.From = "BibleStudent@tftw.org"
  25.     objNewMail.ReplyTo = "BibleStudent@tftw.org"
  26.     objNewMail.To = sendtoemail
  27.  
  28.     If bccemail <> sendtoemail Then
  29.        objNewMail.Cc = bccemail
  30.     End If
  31.  
  32.     objNewMail.Subject= emsubj
  33.     objNewMail.HTMLBody = embody
  34.  
  35.     'Send the email
  36.     objNewMail.Send
  37.  
  38.  
  39.     Set objMailConf = Nothing
  40.     Set objNewMail = Nothing
Sep 23 '08 #1
5 1622
DrBunchman
979 Expert 512MB
Hi Ben,

So what's happening when you run this script? Are you getting an error?

Do you know which port your mail server is configured to use?

Dr B
Sep 23 '08 #2
Dr B,
Mail server is configured to use both ports 25 and 26 to get around this 'blocked port 25 issue'. I did that years ago when traveling because most hotel networks block port 25.

The script appears to execute properly and I get the confirmation of the data sent page afterwords but no email ever arrives. The entire script worked fine before the uplink provider blocked port 25. The authentication lines were simply commented out and the port set to 25 and all was well. Just can't seem to get an email now so I'm sure it has something to do with the authentication but I don't know how to see what it is doing to see what the problem is.

Ben
Sep 23 '08 #3
I'm still working on this and would appreciate help greatly!

I know the username and password are correct in my code above and can walk through the authentication manually but the script still doesn't send email. It worked when I didn't use authentication through port 25 but since uplink has blocked 25 I've got to now authenticate.

Can anyone recommend a program or other way to see what the script is doing when it talks to the remote mail server so I can see where the error is?

Thanks!
Sep 25 '08 #4
Anyone?? Can anyone recommend a program or other way to see what the script is doing when it talks to the remote mail server so I can see where the error is?

Thanks!
Sep 27 '08 #5
JamieHowarth0
533 Expert 512MB
Hi Ben,

Try using telnet from your command line to manually connect to the outgoing mail server.
  1. Open a command prompt
  2. Type telnet and hit return
  3. Type "o mail.yourserver.com 25" (without quotes).
    This requests a connection to mail.yourserver.com on port 25 (change if necessary).
    Your mail server will then respond appropriately.
  4. Type "EHLO yourserver.com"
    The server will return a list of supported commands.
  5. Type "USER yourusername"
    The server should acknowledge the receipt of the username
  6. Type "PASS" or "PWD" followed by the user's password.
    The server will then attempt to authenticate you.

Hopefully this should help you diagnose the problem.

medicineworker
Sep 28 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.