CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Email timing out

Print topic Send  topic

Author Message
ghirst

Posts: 5
Posted: 02/05/2014, 8:11 AM

The below code times out rather than sending. Totally stumped having tried false/true 1/2 different port numbers!
  
'Custom Code @211-73254650  
' -------------------------  
Dim FireUPRN  
Dim FRADate  
Dim SurveyCompany  
Dim Assessor  
Dim TaskType  
Dim Task  
Dim ActionType  
Dim Priority  
Dim RecommendationDate  
Dim TaskAllocatedDate  
Dim TaskAllocatedTo  
Dim TargetDate  
Dim TaskStatus  
Dim TaskComments  
Dim Photo  
Dim AssigneeEmailAddress  
Dim Bodytxt  
  
FireUPRN = Request.Form("FireUPRN")  
FRADate = Request.Form("FRADate")  
SurveyCompany = Request.Form("SurveyCompany")  
Assessor = Request.Form("Assessor")  
TaskType = Request.Form("TaskType")  
Task = Request.Form("Task")  
ActionType = Request.Form("ActionType")  
Priority = Request.Form("Priority")  
RecommendationDate = Request.Form("RecommendationDate")  
TaskAllocatedDate = Request.Form("TaskAllocatedDate")  
TaskAllocatedTo = Request.Form("TaskAllocatedTo")  
TargetDate = Request.Form("TargetDate")  
TaskStatus = Request.Form("TaskStatus")  
TaskComments = Request.Form("TaskComments")  
Photo = Request.Form("Photo")  
  
AssigneeEmailAddress = Request.Form("AssigneeEmailAddress")  
  
Dim ObjSendMail  
Set ObjSendMail = CreateObject("CDO.Message")  
  
'This section provides the configuration information for the remote SMTP server.  
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).  
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.COMPANY-NAME.com"   
'changed 25 to 465  
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25  
'Use SSL for the connection (True or False)  
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False    
'Timeout  
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60  
'If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.  
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") = "webmaster@COMPANY-NAME.com"   
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "villa1982"     
       
ObjSendMail.Configuration.Fields.Update  
'End remote SMTP server configuration section==  
  
ObjSendMail.To = Request.Form("AssigneeEmailAddress")  
ObjSendMail.Subject = "Assigned Fire Risk Assessment Task, which must be carried out within the stated timescale."  
ObjSendMail.From = "webmaster@COMPANY-NAME.com"   
'ObjSendMail.CC = "someone@someone.net"  
'ObjSendMail.AddAttachment "c:\myweb\somefile.jpg"  
  
Bodytxt = "You have been assigned a FRA Task, the details are the following: " & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "UPRN: " &FireUPRN & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "FRA Date: " &FRADate & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Survey Company: " &SurveyCompany & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Assessor: " &Assessor & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task Type: " &TaskType & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task: " &Task & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Action Type: " &ActionType & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Priority: " &Priority & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Recommendation Date: " &RecommendationDate & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task Allocated Date: " &TaskAllocatedDate & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task Allocated To: " &TaskAllocatedTo & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Target Date: " &TargetDate & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task Status: " &TaskStatus & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Task Comments: " &TaskComments & VbCrLf & VbCrLf  
Bodytxt = Bodytxt & "Photo: " &Photo & VbCrLf & VbCrLf  
  
ObjSendMail.TextBody = Bodytxt ' body text  
ObjSendMail.Send     'send command  
Set ObjSendMail = Nothing 'reset mail  
  
' -------------------------  
'End Custom Code  
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.