Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Email sender
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nick Feakes
New Member

99 Posts

Posted - 30 November 2013 :  09:59:00  Show Profile  Reply with Quote
I want the mail system to send a copy of the email back to the sender if a checkbox is ticked. I have the mods to the email box done but the copy to email software (based upon http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=60268&whichpage=1&SearchTerms=mail,copy) doesn't work.
I think mail forwarding is off at the server, is this the reason?
Nick

Edited by - Nick Feakes on 30 November 2013 13:17:39

AnonJr
Moderator

United States
5768 Posts

Posted - 02 December 2013 :  11:12:15  Show Profile  Visit AnonJr's Homepage
Hard to say without code to look at... use the [scrollcode][/scrollcode] tags for any large blocks of code.
Go to Top of Page

Nick Feakes
New Member

99 Posts

Posted - 02 December 2013 :  15:02:25  Show Profile
This is the code in pop_mail.asp placed immediately after the spam control mod (members have to make a minimum number of posts before being able to send emails to other members).


if request.form("CopyOf") =1 then
strOriginalRecipientEmail = rs("M_EMAIL")
strRecipientsName = strRName
strRecipients = Request.Form("YEmail")
strFrom = Request.Form("YEmail")
strFromName = Request.Form("YName")
strSubject = "Sent From " & strForumTitle & " by " & Request.Form("YName") & " - COPY OF THE MESSAGE"
strMessage = "Hello " & Request.Form("YName") & vbNewline & vbNewline
strMessage = strMessage & "This is a copy of an email message from: " & Request.Form("YName") & " (" & Request.Form("YEmail") & ")"
strMessage = strMessage & " To: " & strRName & " (" & strOriginalRecipientEmail & ")" & vbNewline & vbNewline
strMessage = strMessage & Request.Form("Msg") & vbNewline & vbNewline
if strFrom <> "" then
strSender = strFrom
end if
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 02 December 2013 :  16:43:57  Show Profile
Well, if the form field is correct, this should work. It's untested, though.


If Request("CopyOf")=1 Then
	strSql="SELECT M_NAME, M_FIRSTNAME, M_USERNAME, M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
	Set rsMember=my_Conn.Execute(strSql)
	If not rsMember.EOF Then
		strRecipientsName=rsMember("M_FIRSTNAME")
		If isNull(strRecipientsName) Then strRecipientsName=rsMember("M_NAME")
		If isNull(strRecipientsName) Then strRecipientsName=rsMember("M_USERNAME")
		strRecipients=rsMember("M_EMAIL")
		strFrom=rsMember("M_EMAIL")
		rsMember.Close
		strFromName=strRecipientsName
		strOriginalRecipientEmail = rs("M_EMAIL")
		strSubject = "Copy of Email Sent From " & strForumTitle
		strMessage = "Hello " & strRecipientsName & vbNewline & vbNewline
		strMessage = strMessage & "This is a copy of an email message you sent to: "& strOriginalRecipientEmail & vbNewline & vbNewline
		strMessage = strMessage & Request.Form("Msg") & vbNewline & vbNewline
		strSender = strFrom
		%>
		<!--#INCLUDE FILE="inc_mail.asp" -->
		<%
	End If
	Set rsMember=Nothing
End If
Go to Top of Page

Nick Feakes
New Member

99 Posts

Posted - 02 December 2013 :  21:19:28  Show Profile
Thank you for the suggestion but the email to the recipient is received OK but still no copy to the sender. I have commented out the form field IF - End IF to check that possibility but still nothing.
Nick
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 03 December 2013 :  10:12:06  Show Profile
The member account in question does have a legitimate EMail address, right?
Go to Top of Page

Nick Feakes
New Member

99 Posts

Posted - 03 December 2013 :  21:14:48  Show Profile
Yes, it is me! After playing around with some code, I seem to think the server will only transmit an email to the first recipient, further recipients do not receive emails. Does that make sense?
Nick
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 04 December 2013 :  01:27:53  Show Profile
Not really, unless it is some severely restrictive anti-spam filter.
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 04 December 2013 :  02:30:49  Show Profile  Visit Webbo's Homepage
I might be barking up the wrong tree here but is it a Windows server?

Windows server doesn't as far as I know support IMAP which stores sent email and as such might not be capable of sending a copy via a form action. Windows server supports pop3 unless you add software to the server to do so


(PS If I'm talking rubbish please ignore me lol)
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 04 December 2013 :  03:56:07  Show Profile
It's not sending a copy from a stored message, Webbo. It's creating a new EMail addressed to a different individual. The server architecture isn't the issue.
Go to Top of Page

Nick Feakes
New Member

99 Posts

Posted - 04 December 2013 :  11:25:06  Show Profile
I will contact the host and see if there is some anti-spam software at their end. I will let you know.
Nick
Go to Top of Page

Nick Feakes
New Member

99 Posts

Posted - 05 December 2013 :  10:38:32  Show Profile
They say there is no multi email blocking software their end.
Any other ideas why this should not work?
Nick
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 05 December 2013 :  11:12:16  Show Profile
Let's check for errors, shall we? Try this:


If Request("CopyOf")=1 Then
	Err.Clear
	On Error Resume Next
	strSqlMail="SELECT M_NAME, M_FIRSTNAME, M_USERNAME, M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MemberID
	Set rsMember=my_Conn.Execute(strSqlMail)
	If not rsMember.EOF Then
		strRecipientsName=rsMember("M_FIRSTNAME")
		If isNull(strRecipientsName) Then strRecipientsName=rsMember("M_NAME")
		If isNull(strRecipientsName) Then strRecipientsName=rsMember("M_USERNAME")
		strFromName=rsMember("M_EMAIL")
		rsMember.Close
		strOriginalRecipientEmail = rs("M_EMAIL")
		strSubject = "Copy of Email Sent From " & strForumTitle
		strMessage = "Hello " & strRecipientsName & vbNewline & vbNewline
		strMessage = strMessage & "This is a copy of an email message you sent to: "& strOriginalRecipientEmail & vbNewline & vbNewline
		strMessage = strMessage & Request.Form("Msg") & vbNewline & vbNewline
		strRecipients=strFromName
		strSender = strFromName
		%>
		<!--#INCLUDE FILE="inc_mail.asp" -->
		<%
	End If
	Set rsMember=Nothing
	If Err.Number <> 0 Then
		MsgBox Err.Number & ": " & Err.Description & vbCrLf & " on line " & Err.Line & " of " & Err.Source
	End If
	On Error goto 0
End If
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07