Link to "email all"

Message board links from 2010 as taken from the Internet Wayback Machine pages.
Post Reply
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Link to "email all"

Post by admin »

09-07-2009 4:52 AM
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

email all
Reply Contact

A function for admin to email a message to all users
09-08-2009 7:27 PM In reply to
ericwikman
Top 50 Contributor
Joined on 09-09-2009
Posts 6

Re: email all
Reply Contact

I modified the Edit News page to do just that. I chose to allow for full HTML email to be sent from the news section, but if I wanted to only allow text emails then it would have probably only required a single line of code. Also, if I was Mike and I was making this modification I probably would have modified every call to the SendMail function to have an optional extra variable passed, and if that variable is null then send a text email and if it is populated send a HTML email, but since I'm not Mike I just duplicated the SendMail function in email.asp and added one line to it (note that I have the GoDaddy modified SendMail function, but I bolded the changed lines):

function SendHtmlMail(toAddr, subjectText, bodyText, htmlBody)
dim mailer
dim cdoMessage, cdoConfig
'Assume all will go well.
SendHtmlMail = ""
'Configure the message.
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... smtpserver") = "relay-hosting.secureserver.net"
cdoConfig.Fields.Item ("http://schemas.microsoft.com/cdo/config ... smtpserver") = "relay-hosting.secureserver.net"
cdoConfig.Fields.Item ("http://schemas.microsoft.com/cdo/config ... serverport") = 25
cdoConfig.Fields.Item ("http://schemas.microsoft.com/cdo/config ... thenticate") = 1
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
'Create the email.
cdoMessage.From = "Eric Wikman <eric@example.com>"
cdoMessage.To = toAddr
cdoMessage.Subject = subjectText
cdoMessage.HTMLBody = htmlBody
cdoMessage.TextBody = bodyText
'Send it.
on error resume next
cdoMessage.Send
'If an error occurred, return the error description.
if Err.Number <> 0 then
SendHtmlMail = Err.Description
end if
'Clean up.
set cdoMessage = Nothing
set cdoConfig = Nothing
end function

and then modify editNews.asp to look like:

sub SendNotifications()

dim subj, body, htmlBody
dim list, email

subj = "Football Pool News Notification"
body = "The site news has been updated." & vbCrLf _
& "Please visit " & POOL_URL & " for more information." & vbCrLf
htmlBody = Request.Form("newContent") & vbCrLf & "<p>" & "Please visit <a href=""" & POOL_URL & """>" & POOL_URL & "</a> for more information.</p>"

list = GetNotificationList("NotifyOfNewsUpdates")
for each email in list
call SendHtmlMail(email, subj, body, htmlBody)
next

end sub %>
09-08-2009 7:36 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: email all
Reply Contact

That's actually a good idea (plain tex or html email option). I'll keep it in mind for the next revision.

Thanks for sharing the code btw. You folks are coming up with a lot of good ideas.
09-09-2009 6:12 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: email all
Reply Contact

I've changed the email.asp to send all messages as HTML by changing the following:

'Create the email.
cdoMessage.From = "Football Pool" & " <" & ADMIN_EMAIL & ">"
cdoMessage.To = toAddr
cdoMessage.Subject = subjectText
cdoMessage.HTMLBody = bodyText

And then I added the HTML formatting to the editNews.asp file:

<% '**************************************************************************
'* Local functions and subroutines. *
'**************************************************************************

'--------------------------------------------------------------------------
' Sends an email notification to any users who have elected to receive
' them.
'--------------------------------------------------------------------------
sub SendNotifications()

dim subj, body
dim sql, rs
dim email

subj = PAGE_TITLE & " - News Update Notification"
body = "<html><head><link rel=""stylesheet"" type=""text/css"" href=""http://www.YOURHOST.com/YOURPOOL/styles/common.css"" /></head>" & VbCrLf _
& "<body>" & VbCrLf _
& "<table id=""wrapper"" align=""center""><tr><td>" & VbCrLf _
& "<table class=""main newsletter"" cellpadding=""0"" cellspacing=""0"">" & VbCrLf _
& "<tr class=""header bottomEdge"">" & VbCrLf _
& "<th align=""left"">Football Pool News Update</th>" & VbCrLf _
& "</tr>" & VbCrLf _
& "<tr>" & VbCrLf _
& "<td class=""freeForm"">" & VbCrLf _
& news & VbCrLf _
& "<p class=""warningMsg"">Don't forget to make your picks for the upcoming week!<br/><br/>" & VbCrLf _
& "<a href=" & POOL_URL & ">Football Pool</a></p>" & VbCrLf _
& "</td>" & VbCrLf _
& "</tr>" & VbCrLf _
& "</table>" & VbCrLf _
& "</td></tr></table></body></html>"
sql = "SELECT EmailAddress FROM Users WHERE NotifyOfNewsUpdates = true"
set rs = DbConn.Execute(sql)
do while not rs.EOF
email = Decrypt(rs.Fields("EmailAddress").Value)
if email <> "" then
call SendMail(email, subj, body)
end if
rs.MoveNext
loop

end sub %>

I think that if you removed the line in blue above it would e-mail everyone regardless of what they have set in there profile. However, I left the code and I check that block for them so that they still have the option of not receiving e-mails. I never heard any complaints last season by doing that so that's what I'm doing this season.

Doing this method produces a great looking e-mail in Outlook and web-based e-mails (gmail and hotmail) that mirrors your pool. The only thing that doesn't show up is if you have a background image on your pool.
09-10-2009 5:20 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

Smokey Jones

yours is slightly different as it appears you are using SQL vs ACCESS

there is a bunch of coding in here that is different than the original
09-18-2009 7:39 AM In reply to
Smokey Jones
Top 10 Contributor
Joined on 08-24-2009
Posts 84

Re: email all
Reply Contact

drizzt09:

Smokey Jones

yours is slightly different as it appears you are using SQL vs ACCESS

there is a bunch of coding in here that is different than the original

The only difference in my set up is that I have use the Windows SMTP service to send the mail and I have all of the HTML mail formatting in the script. Still using the Access DB.
09-20-2009 8:04 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

Smokey Jones:

I've changed the email.asp to send all messages as HTML by changing the following:

'Create the email.
cdoMessage.From = "Football Pool" & " <" & ADMIN_EMAIL & ">"
cdoMessage.To = toAddr
cdoMessage.Subject = subjectText
cdoMessage.HTMLBody = bodyText

And then I added the HTML formatting to the editNews.asp file:

<% '**************************************************************************
'* Local functions and subroutines. *
'**************************************************************************

'--------------------------------------------------------------------------
' Sends an email notification to any users who have elected to receive
' them.
'--------------------------------------------------------------------------
sub SendNotifications()

dim subj, body
dim sql, rs
dim email

subj = PAGE_TITLE & " - News Update Notification"
body = "<html><head><link rel=""stylesheet"" type=""text/css"" href=""http://www.YOURHOST.com/YOURPOOL/styles/common.css"" /></head>" & VbCrLf _
& "<body>" & VbCrLf _
& "<table id=""wrapper"" align=""center""><tr><td>" & VbCrLf _
& "<table class=""main newsletter"" cellpadding=""0"" cellspacing=""0"">" & VbCrLf _
& "<tr class=""header bottomEdge"">" & VbCrLf _
& "<th align=""left"">Football Pool News Update</th>" & VbCrLf _
& "</tr>" & VbCrLf _
& "<tr>" & VbCrLf _
& "<td class=""freeForm"">" & VbCrLf _
& news & VbCrLf _
& "<p class=""warningMsg"">Don't forget to make your picks for the upcoming week!<br/><br/>" & VbCrLf _
& "<a href=" & POOL_URL & ">Football Pool</a></p>" & VbCrLf _
& "</td>" & VbCrLf _
& "</tr>" & VbCrLf _
& "</table>" & VbCrLf _
& "</td></tr></table></body></html>"
sql = "SELECT EmailAddress FROM Users WHERE NotifyOfNewsUpdates = true"
set rs = DbConn.Execute(sql)
do while not rs.EOF
email = Decrypt(rs.Fields("EmailAddress").Value)
if email <> "" then
call SendMail(email, subj, body)
end if
rs.MoveNext
loop

end sub %>

I think that if you removed the line in blue above it would e-mail everyone regardless of what they have set in there profile. However, I left the code and I check that block for them so that they still have the option of not receiving e-mails. I never heard any complaints last season by doing that so that's what I'm doing this season.

Doing this method produces a great looking e-mail in Outlook and web-based e-mails (gmail and hotmail) that mirrors your pool. The only thing that doesn't show up is if you have a background image on your pool.



the email.asp I already had. The editNews.asp, I dont see anything HTML related that is changed. the green area I have. the red part is completely different in mine. I have:


list = GetNotificationList("NotifyOfNewsUpdates")
for each email in list
call SendMail(email, subj, body)
next

end sub %>
09-20-2009 9:36 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: email all
Reply Contact

Did you add this to the SendMail function in email.asp?

cdoMessage.HTMLBody = bodyText
09-21-2009 2:00 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

ya I already had that part from adding Randy's forgot password coding. His required HTML email.

its the editNews.asp coding that Im confused about.
09-21-2009 7:31 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: email all
Reply Contact

You mean the different red sections in your post? They are doing pretty much the same thing. Smokey's code pulls the email addresses straight from the database which is exactly what the GetNotificationsList function does. Either method should give the same results.
09-21-2009 3:07 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

Mike, i sent you an email with a coding script. not sure if you got it. Let me know what you think.
09-21-2009 6:38 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: email all
Reply Contact

Taking from everyone else's code, here's a full script. Note that you'd have to modify the SendHtmlEmail function to work with whatever email component your host has (just like the existing SendMail function).

<%@ LANGUAGE="VBScript" %>
<!-- #include file="includes/config.asp" --><!-- #include file="includes/common.asp" --><% PageSubTitle = "Email All Users" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<% 'Limit access to the Administrator.
call CheckAccess(true) %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title><% = PAGE_TITLE & ": " & PageSubTitle %></title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="styles/common.css" />
<link rel="stylesheet" type="text/css" href="styles/print.css" media="print" />
<script type="text/javascript" src="scripts/scriptLib.js"></script>
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">//<![CDATA[
//=========================================================================
// Create the TinyMCE control to be used for editing the email.
//=========================================================================
tinyMCE.init({
content_css : "styles/common.css",
editor_selector : "mceEditor",
font_size_style_values : "xx-small,x-small,small,medium,large,x-large,xx-large",
mode : "textareas",
plugins : "advimage,advlink,emotions,fullscreen,iespell,inlinepopups,layer,media,preview,safari,searchreplace,style,table,xhtmlxtras",
theme : "advanced",
theme_advanced_buttons1 : "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|,bold,italic,underline,strikethrough",
theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,image,hr,|,charmap,emotions,media",
theme_advanced_buttons3 : "insertlayer,moveforward,movebackward,absolute,|,tablecontrols,|,visualaid",
theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,|,search,replace,|,undo,redo,|,removeformat,cleanup,code,iespell,|,fullscreen,preview,|,help",
theme_advanced_font_sizes : "xx-small,x-small,small,medium,large,x-large,xx-large",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
theme_advanced_path : false,
theme_advanced_resizing : false
});
//]]></script>
</head>
<body>
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/siteMenu.asp" -->
<div id="contentSection">
<!-- #include file="includes/email.asp" -->
<!-- #include file="includes/encryption.asp" -->
<!-- #include file="includes/form.asp" -->
<table id="mainWrapper" border="0" cellpadding="0" cellspacing="0"><tr><td>
<% 'Open the database.
call OpenDB()

'If an send was requested, process it.
dim sql, rs
dim subj, msg, email
dim str, errorMsg
if Request.Form("submit") = "Send" then

subj = Request.Form("subject")
msg = Request.Form("body")
sql = "SELECT EmailAddress FROM Users"
set rs = DbConn.Execute(sql)
do while not rs.EOF
email = Decrypt(rs.Fields("EmailAddress").Value)
if email <> "" then
errorMsg = SendHtmlEmail(email, subj, msg)
if errorMsg <> "" then
call DisplayErrorMessage("Email send failed: " & errorMsg)
exit do
end if
end if
rs.MoveNext
loop
if errorMsg = "" then
call DisplaySuccessMessage("Emails sent.")
end if
end if

'Display the form.
dim subjectText, bodyText
if Request.ServerVariables("Content_Length") > 0 and not IsCancelRequest() then
subjectText = Request.Form("subject")
bodyText = Request.Form("body")
end if %>
<form action="<% = Request.ServerVariables("SCRIPT_NAME") %>" method="post">
<table class="main fixed" border="0" cellpadding="0" cellspacing="0">
<tr class="header bottomEdge">
<th align="left">Send Email to All Users</th>
</tr>
<tr>
<td class="freeForm">
<p><strong>Subject:</strong> <input type="text" name="subject" value="<% = subjectText %>" size="50" /></p>
<table class="htmlEditorArea" border="0" cellpadding="0" cellspacing="0"><tr><td style="padding: 0px;">
<div style="margin: 0px;">
<textarea name="body" class="mceEditor" rows="30" cols="80" style="width: 39em;"><% = bodyText %></textarea>
</div>
</td></tr></table>
</td>
</tr>
</table>
<p><input type="submit" name="submit" value="Send" class="button" />&nbsp;<input type="submit" name="submit" value="Cancel" class="button" /></p>
</form>
</td></tr></table>
</div>
<!-- #include file="includes/footer.asp" -->
</body>
</html>
<% '**************************************************************************
'* Local functions and subroutines. *
'**************************************************************************

'--------------------------------------------------------------------------
' Sends an email in HTML format and returns an empty string if successful.
' Otherwise, it returns the error message.
'--------------------------------------------------------------------------
function SendHtmlEmail(toAddr, subjectText, htmlBody)

dim mailer
dim cdoMessage, cdoConfig

'Assume all will go well.
SendHtmlEmail = ""

'Configure the message.
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... smtpserver") = "mail.example.net"
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig

'Create the email.
cdoMessage.From = ADMIN_USERNAME & " <" & ADMIN_EMAIL & ">"
cdoMessage.To = toAddr
cdoMessage.Subject = subjectText
cdoMessage.HTMLBody = htmlBody

'Send it.
on error resume next
cdoMessage.Send

'If an error occurred, return the error description.
if Err.Number <> 0 then
SendHtmlEmail = Err.Description
end if

'Clean up.
set cdoMessage = Nothing
set cdoConfig = Nothing

end function %>

Filed under: customization, email
09-21-2009 8:52 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

this replaces the existing editNews.asp completely?

thanks
09-21-2009 9:02 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 456

Re: email all
Reply Contact

This would be a separate file, it doesn't update the home page it just sends an email to everyone.
09-22-2009 3:14 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 322

Re: email all
Reply Contact

ok so it would be a separate file... emailAll.asp?

now how does it get used

when you use edit news, and post news to the homescreen, does it automatically use the file to send the same info by email?

Im not getting how it gets used or how it works.



thanks and sorry

Page 1 of 2 (23 items) 1 2 Next >
User avatar
admin
Site Admin
Posts: 159
Joined: Mon Aug 26, 2013 3:47 pm

Re: Link to "email all"

Post by admin »

09-22-2009 4:14 PM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 457

Re: email all
Reply Contact

No problem, how do you want it to work? If you want to email the news updates, then go with smokey jones's update to the editNews.asp file.If you just want to create and send an email to everyone (completely separate from the home page news), then paste that code into a file named emailAll.asp and use that (you could add a link to it on the admin menu).
09-22-2009 5:41 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

ok the admin menu approach was what I was looking for, thanks
09-23-2009 5:47 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

ok I added the code to new file... emailAll.asp

in admin menu added :

<div class="separator"></div>
<a href="editNews.asp">Edit News</a>
<a href="emailAll.asp">Email All Users</a>
</div>


Then I added my new chat room, which then used the email all function to email everyone to tell them about the new chat. Worked like a charm. Only thing I noticed was when I Send(which has no graphic button), it says sent successfully at the top, but it doesnt clear the subject or the body automatically.
01-30-2010 11:14 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

OK so I did this for the NHL pool too. Got email setup for my GMAIL, got emailall.asp, and the menu option in admin. send an email and it returns this error:

Email send failed: The server rejected one or more recipient addresses. The server response was: 553 5.1.2 or other punctuation after the recipient's email address. 23sm2773311qyk.15

Im assuming this means someone entered a fake email address. open the database and its all coded. anyway to decrypt the email so I can find the culprit. Also any code to the signin screen to prevent it from happening again?
01-31-2010 9:24 AM In reply to
mikehall
Top 10 Contributor
Joined on 08-09-2009
Chandler, AZ
Posts 457

Re: email all
Reply Contact

You can see players unencrypted email addresses in their profiles (editProfile.asp). It may be that you tried to use the encrypted value to send the email. Anytime you pull the email address from the database, use the Decrypt() function (in includes/encryption.asp) to unencrypt it.
01-31-2010 2:14 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

ok I went through each profile, all emails are correct. so it must be that encryption thing. however Im using the same code u posted on the 1st page of this topic.

<%@ LANGUAGE="VBScript" %>
<!-- #include file="includes/config.asp" --><!-- #include file="includes/common.asp" --><% PageSubTitle = "Email All Users" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<% 'Limit access to the Administrator.
call CheckAccess(true) %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title><% = PAGE_TITLE & ": " & PageSubTitle %></title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="styles/common.css" />
<link rel="stylesheet" type="text/css" href="styles/print.css" media="print" />
<script type="text/javascript" src="scripts/scriptLib.js"></script>
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">//<![CDATA[
//=========================================================================
// Create the TinyMCE control to be used for editing the email.
//=========================================================================
tinyMCE.init({
content_css : "styles/common.css",
editor_selector : "mceEditor",
font_size_style_values : "xx-small,x-small,small,medium,large,x-large,xx-large",
mode : "textareas",
plugins : "advimage,advlink,emotions,fullscreen,iespell,inlinepopups,layer,media,preview,safari,searchreplace,style,table,xhtmlxtras",
theme : "advanced",
theme_advanced_buttons1 : "formatselect,fontselect,fontsizeselect,|,forecolor,backcolor,|,bold,italic,underline,strikethrough",
theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,image,hr,|,charmap,emotions,media",
theme_advanced_buttons3 : "insertlayer,moveforward,movebackward,absolute,|,tablecontrols,|,visualaid",
theme_advanced_buttons4 : "styleprops,|,cite,abbr,acronym,del,ins,attribs,|,search,replace,|,undo,redo,|,removeformat,cleanup,code,iespell,|,fullscreen,preview,|,help",
theme_advanced_font_sizes : "xx-small,x-small,small,medium,large,x-large,xx-large",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
theme_advanced_path : false,
theme_advanced_resizing : false
});
//]]></script>
</head>
<body>
<!-- #include file="includes/header.asp" -->
<!-- #include file="includes/siteMenu.asp" -->
<div id="contentSection">
<!-- #include file="includes/email.asp" -->
<!-- #include file="includes/encryption.asp" -->
<!-- #include file="includes/form.asp" -->
<table id="mainWrapper" border="0" cellpadding="0" cellspacing="0"><tr><td>
<% 'Open the database.
call OpenDB()

'If an send was requested, process it.
dim sql, rs
dim subj, msg, email
dim str, errorMsg
if Request.Form("submit") = "Send" then

subj = Request.Form("subject")
msg = Request.Form("body")
sql = "SELECT EmailAddress FROM Users"
set rs = DbConn.Execute(sql)
do while not rs.EOF
email = Decrypt(rs.Fields("EmailAddress").Value)
if email <> "" then
errorMsg = SendHtmlEmail(email, subj, msg)
if errorMsg <> "" then
call DisplayErrorMessage("Email send failed: " & errorMsg)
exit do
end if
end if
rs.MoveNext
loop
if errorMsg = "" then
call DisplaySuccessMessage("Emails sent.")
end if
end if

'Display the form.
dim subjectText, bodyText
if Request.ServerVariables("Content_Length") > 0 and not IsCancelRequest() then
subjectText = Request.Form("subject")
bodyText = Request.Form("body")
end if %>
<form action="<% = Request.ServerVariables("SCRIPT_NAME") %>" method="post">
<table class="main fixed" border="0" cellpadding="0" cellspacing="0">
<tr class="header bottomEdge">
<th align="left">Send Email to All Users</th>
</tr>
<tr>
<td class="freeForm">
<p><strong>Subject:</strong> <input type="text" name="subject" value="<% = subjectText %>" size="50" /></p>
<table class="htmlEditorArea" border="0" cellpadding="0" cellspacing="0"><tr><td style="padding: 0px;">
<div style="margin: 0px;">
<textarea name="body" class="mceEditor" rows="30" cols="80" style="width: 39em;"><% = bodyText %></textarea>
</div>
</td></tr></table>
</td>
</tr>
</table>
<p><input type="submit" name="submit" value="Send" class="button" />&nbsp;<input type="submit" name="submit" value="Cancel" class="button" /></p>
</form>
</td></tr></table>
</div>
<!-- #include file="includes/footer.asp" -->
</body>
</html>
<% '**************************************************************************
'* Local functions and subroutines. *
'**************************************************************************

'--------------------------------------------------------------------------
' Sends an email in HTML format and returns an empty string if successful.
' Otherwise, it returns the error message.
'--------------------------------------------------------------------------
function SendHtmlEmail(toAddr, subjectText, htmlBody)

dim mailer
dim cdoMessage, cdoConfig

'Assume all will go well.
SendHtmlEmail = ""

'Configure the message.
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... /sendusing") = 2
cdoConfig.Fields("http://schemas.microsoft.com/cdo/config ... smtpserver") = "mail.example.net"
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig

'Create the email.
cdoMessage.From = ADMIN_USERNAME & " <" & ADMIN_EMAIL & ">"
cdoMessage.To = toAddr
cdoMessage.Subject = subjectText
cdoMessage.HTMLBody = htmlBody

'Send it.
on error resume next
cdoMessage.Send

'If an error occurred, return the error description.
if Err.Number <> 0 then
SendHtmlEmail = Err.Description
end if

'Clean up.
set cdoMessage = Nothing
set cdoConfig = Nothing

end function %>

I have not touched the encryption.asp file at all. so what will i be looking for?
02-25-2010 11:17 AM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

So any ideas on this one? I still dont have this issue resolved... for the NHL pool. works in the NFL pool
03-05-2010 2:47 PM In reply to
drizzt09
Top 10 Contributor
Joined on 08-22-2009
Ontario Canada
Posts 323

Re: email all
Reply Contact

ok this one, checked all users emails. even deleted everyones emails and changed them to mine, go to email all and send

Email send failed: The server rejected one or more recipient addresses. The server response was: 553 5.1.2 or other punctuation after the recipient's email address. m5sm6873707gve.12

everytime i try that last number changes

email address. x6sm6813724gvf.28

email address. t12sm6933432gvd.22

etc. etc.

Page 2 of 2 (23 items) < Previous 1 2
Post Reply