![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi Guys, I have been searching for a solution for a while but haven't made any headway, if anyone could give me any ideas I would be extremely grateful. The scenario is that I have been using CDOSYS to send automated emails from a number of Intranet pages within my organisation. Everything worked fine until a month or so ago, when we installed a new servicepack to our email system - Novell Groupwise. Since the upgrade, automatic emails intermittently fail, with the error: CDO.Message.1 error '80040213' The transport failed to connect to the server. /nmdb/checkform.asp, line 41 Line 41 is the Line "cdoMessage.Send" After much experimentation, I found that, because I am sending the message directly to the smtp server and bypassing the mail sweeper, the smtp server assumes that the mail should come from an external domain - if it does not come from an external domain, the email is blocked. I suppose this makes sense because it means that I cant create an email saying that everyone has had a pay rise and pretend that it came from the MD!!! Unfortunately, some emails are still failing for no apparaent reason. To combat this I have created a VB6 dll to re-send the email if it fails, the code within the dll is: Code: Private Sub doSend(strTo, strFrom, strSubject, strMessage, strAttachment)
On Error GoTo ErrorHandler
Set imsg = CreateObject("cdo.message")
Set iconf = CreateObject("cdo.configuration")
Set Flds = iconf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 'IP Address of SMTP Server
.Update
End With
Dim strReceiveremail, strFrom, strSubject, strHTML As String
With imsg
Set .Configuration = iconf
.To = strTo
.From = strFrom
.Subject = strSubject
.HTMLBody = strMessage
.Fields.Update
.AddAttachment (strAttachement)
.Send
End With
Set imsg = Nothing
Set iconf = Nothing
ErrorHandler:
If Err.Number <> 0 Then
While Err.Number <> 0
Call doSend
Wend
Unload Me
End If
End Sub
Code: <%
Dim strMessage
strMessage = Request.Form("Full_Name") & vbVerticalTab & vbCrLf & "Submitted Feedback on " & Date & vbCr & "------------------------" & vbCrLf & "Question: " & Request.Form("Question")
Dim objSendMail
Set objSendMail = Server.CreateObject("AutoEMail.Class1")
call objSendMail.doSend("sync_or_swim@test.co.uk", "someaddress@fakedomain.co.uk", "User Feedback Submitted", strMessage)
Set objSendMail = Nothing
Response.Write("Thank you. Your message has been sent to the Database Administrator")
%>
And now for my question, finally!!! Is there any way that I can call my dll from the asp page so that it runs in the background? Ie. So that it keeps trying to resend the message, but passes control back to the asp pages straight away so that I can do something else and the user doesn't have to wait for the email to send and there is no delay in the page loading. Does anybody know if this is possible or am I on a wild goose chase? |
| Sponsored Links |
|
#2
| ||||
| ||||
| Regarding the original problem...can't you point your script to relay through the Groupwise server to see if that will solve the problem? Regarding your question, I'm not sure if that's even possible.
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Email] Simple way to email form | Rebelle | ASP Development | 17 | August 14th, 2008 04:03 PM |
| send Bulk email | peebman2000 | .Net Development | 2 | June 20th, 2008 10:06 AM |
| windows service send emails every 10 days | peebman2000 | .Net Development | 8 | May 20th, 2008 04:00 PM |
| [VBScript] VBS Send Mail | keep_it_simple | Windows Scripting | 0 | March 22nd, 2008 11:58 AM |