ASP Dundas Mailer

I have a web page xp_contactus.asp there is an email address that no longer is valid therefore when someone goes to request information it sends a reply back to them lettting them know the mail box is no longer available.  I tried to make it so my email address or a currently email address is there instead once I do that I get an error message and it never gets sent out.  Below is my ASP Page:

<!--#include file="inc_header.asp"-->
<%
Dim objEmail 'stores mailer control instance
Dim Index 'counter variable
dim sendersName, sendersEmail, EmailSubject, message

'Server.ScriptTimeout = 240

' enter your newsletter editors name
sendersName      = request("name")

' enter the email address for the emails
' to appear to come from
sendersEmail=request("email")
if sendersEmail="" then
      sendersEmail = "techsupport1@cormarkinc.com"
end if

EmailSubject = "Website Cormark - Contact."

' the following line will take
' whatever text you enter on the form
message =       "Name: "                         & sendersname & vbcrlf &_
                  "Company: "                   & request("company") & vbcrlf &_
                  "Title/Department: "       & request("title") & vbcrlf &_
                  "Address: "                   & request("address") & vbcrlf &_
                  "City: "                         & request("city") & vbcrlf &_
                  "State: "                         & request("state") & vbcrlf &_
                  "Zip Code: "                   & request("zip") & vbcrlf &_
                  "Country: "                   & request("country") & vbcrlf &_
                  "E-mail: "                         & request("email") & vbcrlf &_
                  "Phone: "                         & request("phone") & vbcrlf &_
                  "Fax: "                         & request("fax") & vbcrlf & vbcrlf &_
                  "Message"                         & vbcrlf & request("message")


'functions will throw an exception if not successful so On Error Resume Next is used for inline error trapping
'On Error Resume Next

Set objEmail = Server.CreateObject("Dundas.Mailer") 'Mailer object
'objEmail.SMTPRelayServers.Add "206.135.21.252"
'objEmail.TimeOutConnect = 180
'objEmail.TimeOutSend      = 120
'objEmail.TimeOutReceive      = 120


'add an Address object to the TOs collection (this specifies the destination address)
objEmail.TOs.Add "cormark@livrodigital.com.br" THIS IS WHERE I MAKE THE CHANGE AND ENTER THE CORRECT EMAIL ADDRESS

'specify the message subject
objEmail.Subject = EmailSubject

'specify the sender of the message
objEmail.FromName            = sendersName
objEmail.FromAddress      = sendersEmail

'specify an SMTP server. Doing this increases the speed and reliability of the mail operation
'objEmail.SMTPRelayServers.Add "somesmtpserver.com"

'set the message body
objEmail.Body = message

'now send the email
objEmail.SendMail









%>

      <table width="751" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#000000"><table width="751" border="0" cellspacing="1" cellpadding="0">
              <tr>
                <td width="236"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="236" height="343" hspace="0" vspace="0"><param name="movie" value="../swf/contactus.swf"><param name=quality value=high><embed src="../swf/contactus.swf" width="236" height="343" hspace="0" vspace="0" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed></object></td>
                <td height="63" bgcolor="#F6F5F3" valign="top">
<table width="420" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td colspan="3" height="100"></td>
                    </tr>
                    <tr>
                      <td width="60" class="portfolio">&nbsp;</td>
                      <td class="portfolio"><p>We will be providing you with any information required within the shortest time possible.</p><p>Thank you for contacting Cormark.</p></td>
                      <td width="22">&nbsp;</td>
                    </tr>
                    <tr>
                      <td colspan="3" height="22"></td>
                    </tr>
                  </table>
</td>
              </tr>
                    </table>

                      </td>
              </tr>
            </table>
              </td>
        </tr>
      </table>

      <table width="751" height="40" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="bottom"><img src="icon/px.gif" width="247" height="1"><img src="icon/txt_address1a.gif" width="410" height="24"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
<%
Set objEmail = Nothing 'release resources
%>




<%
function titleCase(strWord)

if not strWord = "" then
      titleCase=ucase(left(strWord,1)) & lcase(right(strWord,len(strWord)-1))
else
      titleCase=""
end if            

end function

function unhtml(strText)

strText=replace(strText,"<P>", vbcrlf & vbcrlf,1,-1,1)
strText=replace(strText,"<BR>", vbcrlf,1,-1,1)
strText=replace(strText,"<B>", "",1,-1,1)
strText=replace(strText,"<STRONG>", ":: ",1,-1,1)
strText=replace(strText,"<I>", "",1,-1,1)
strText=replace(strText,"</P>", "",1,-1,1)
strText=replace(strText,"</B>", "",1,-1,1)
strText=replace(strText,"</I>", "",1,-1,1)
strText=replace(strText,"</STRONG>", "",1,-1,1)
strText=replace(strText,"<a href=""", "",1,-1,1)
strText=replace(strText,""">", vbcrlf,1,-1,1)
strText=replace(strText,"</A>","",1,-1,1)
unhtml=strText

end function


function friendlyDate(dtmDate)

lastDigit=right(day(dtmDate),1)
dayNumber=day(dtmDate)

if lastDigit="1" and not dayNumber="11" then
      dayNumber=dayNumber & "st"
elseif lastDigit = "2" and not dayNumber= "12" then
      dayNumber=dayNumber & "nd"
elseif lastDigit = "3" and not dayNumber = "13" then
      dayNumber=dayNumber & "rd"
elseif lastDigit >= 4 or lastDigit = 0 or dayNumber = 11 or dayNumber = 12 then
      dayNumber=dayNumber & "th"
end if
friendlyDate=(weekdayname(weekday(dtmDate)) & " " & dayNumber & " " & monthname(month(dtmDate)) & ", " & year(dtmDate) )
end function
%>

When I make that change I get the following message:

Dundas.Mailer.1 error '80004005'

The connection timed-out.

/xt_contactus.asp, line 64


What else needs to change to make this go to a current email address??
cormarkAsked:
Who is Participating?
 
b0lsc0ttConnect With a Mentor IT ManagerCommented:
A couple of links with examples are below.  The second is a comment on EE in a closed question (PAQ'd).

http://www.w3schools.com/asp/asp_send_email.asp
http:Q_20779650.html#9630147

Let me know how it works or if you have a question.

bol
0
 
b0lsc0ttIT ManagerCommented:
cormark,

Line 64 seems to be the line below ...

objEmail.SendMail

Please confirm. Did you change anything else?  I would recommend uncommenting the timeout settings for the object since the default is probably lower.  The mailer object seems to be timing out.

objEmail.TimeOutConnect = 180
objEmail.TimeOutSend     = 120
objEmail.TimeOutReceive     = 120

Is this mail component used in any other working scripts?  It may be some server issue if other scripts also have the problem.  If another works then compare other settings for that object like the SMTP servers.  If you are missing info in this script then it would explain the failure.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
cormarkAuthor Commented:
thanks for the response

I did not change anything else.  I will try uncommenting the timeout settings as suggested.  I can't see of find where this mail component is used in any other scripts that is what is driving me crazy it would seem just changing the address would work.  

Nothing has changed with script I have several backups and they are all the same.  The only thing that change was the current email address...
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
cormarkAuthor Commented:
I tried to remove the timeout's but the same occurred.  
0
 
b0lsc0ttIT ManagerCommented:
Is there anything in the include file that would effect this?

The error message and the issue seem really odd.  Do you use other email components in other ASP scripts?  If so, how about changing this script to use that component?  You may even be able to use the default CDOSYS (or CDONTS if the server OS is older).

Let me know what you think or how I can help.

bol
0
 
cormarkAuthor Commented:
We do not use any other email components in other ASP Scripts any email options on the website will go directly to an email account instead through a script.  There is nothing else I can see or find that I could change or that is associated with this script.  I will look into the CDOSYS and try to get that to work.
0
 
b0lsc0ttIT ManagerCommented:
Let me know if you need some sample script to know how to use CDOSYS.

bol
0
 
cormarkAuthor Commented:
Yes please that would be great....as you see from the script above it's nothing fancy just something simple that would send an email to a person for contact us information.
0
 
cormarkAuthor Commented:
Thanks, but I think I figured out why it's not sending, well sort of.  If I try to telnet to my mail server from that PC it can not "Could not open connection to host" if I do the telnet else where I get connected.  So I think this is the stem of my problem but I don't know why.  I try to telnet to another mail server and it works fine.  any thoughts?
0
 
cormarkAuthor Commented:
Thanks for all the help.  I finally got the mail to go out, it was something with the SMTP after all that.  I couldn't even get webaccess to open from IE, I added a different SMTP server to the ASP script and it works.  Thanks for all the help!
0
 
b0lsc0ttIT ManagerCommented:
Your welcome!  I'm glad that I could help.  Thank you for the grade, the points and the fun question.

bol
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.