Friends,
My hosting compay recently updated their email sending polices and now they require user authentication for every email generated by website. there is service on my site which enable sending message and in result to that message email notification is generated for receiver. when i send the message to any other user it shows me the following error
error '8004020f'
/send_message.inc, line 38
Its authantication error, if possible let me know how can i authenticate out going email
I am h
ighlighting (RED) the line where error is generated.
I will be greatful if some one could help me in it.
Thanks Joey
<% If Request.QueryString("ID")="" Then Response.Redirect "/public_diary.asp"
If Request.Form("sendmsg")="Send Message" Then
Dim subj
If Len(Trim(Request.Form("subject"))) = 0 Then subj = "<Nothing>" else subj = Request.Form("subject")
Randomize
Session("DB").Execute "insert into messages (Message, UserID, IsNew, Author, TimeArrival, Subject, SessionID) Values (" &_
"'" & SetString(Request.Form("message")) & "', " &_
Request.QueryString("id") & ", 1, " & Session("LoginID") & ",'" & Now() & "', " & _
"'" & SetString(SETHTML(SetString(subj))) & "'," & (Int((Session.SessionID-1+1)*Rnd+1)) & ")"
CloseAll()
Session("RS").Open "Select EmailAddress from Users Where ID=" & Request.QueryString("ID"),Session("DB"),1,3
With eMail
.To = Session("RS")("EmailAddress")
.From = "124Diary.com <
do-not-reply@124diary.com>"
.Subject = GetFullname(Session("LoginID")) & " sent you an e-message"
.HTMLBody = "<font face=verdana size=2>Dear " & GetFullname(Request.QueryString("ID")) & ",<br><BR>"
.HTMLBody = .HTMLBody & "You have received new e-message from <b>" & GetFullname(Session("LoginID")) & "</b> in your <a href='http://www.124diary.com'>124diary.com</a> inbox<BR>"
.HTMLBody = .HTMLBody & "Visit <a href='http://www.124diary.com/inbox.asp'>http://www.124diary.com/inbox.asp</a> to view your messages<br><br>"
.HTMLBody = .HTMLBody & "Best regards,<br>124diary.com team</font>"
.HTMLBody = .HTMLBody & "<br><br><hr>This is auto generated email, don't reply this email."
.Send
End With
Session("SendMessage")="Yes"
Response.Redirect "/inbox.asp"
End If%>
<script type="text/javascript">
function submitform() {
var strString = rte.doGetSource( 'ctl1' );
sendform.message.value = strString;
return true;
}
</script>
<form method="post" action="send_message.asp?id=<%=Request.QueryString ("ID")%>" name="sendform" id="sendform" onsubmit="return submitform()">
<table width="460" border="0" cellspacing="2" cellpadding="2" background="">
<tr class=mytext>
<td align=right>Send to: </td><td><%=GetFullname(Request.QueryString("id"))%> </td></tr>
<tr class=mytext><td align=right>Subject:</td><td><input value="<%=Request.QueryString("subject")%>" name=subject size=80 class=mytextbox></td></tr>
<tr><td colspan=2 align=center class=mytext>(<a href="javascript
:showemoticons()">Add Emoticons to your message</a>) <font color=red><sup>New Feature</sup></font></td></tr>
<tr class=mytext><td colspan=2 align=center><textarea style="display:none" cols=50 rows=15 class=mytextbox name="message"></textarea>
<script language="JavaScript" type="text/javascript">
rte.setHostName ( "http://www.webmaster-talk.com/images/" );
rte.setBlankHtmlName( "blank.html" );
rte.jo_rte_init('ctl1', '', 600, 300);
</script>
</td></tr>
<tr><th colspan=2><input type=submit value="Send Message" name="sendmsg" class=mybutton></th></tr>
</table>
</form>