Copy link to clipboard
Copied
DW CS3 - ASP VBScript - Access
How do I do this? I'd like to pull emails from all records in a table where a specific column is checked Yes (subscribed), in order to send group email.
Are there scripts to handle this?
Then you just need to search the web for something like 'asp mail list script'. The basic concept is simple. Load the addresses into a recordset, and loop through the recordset adding addresses to the email bcc field. Because mail servers have max address limitations, it also needs to have another loop to break the records into smaller sets of 25-50 addresses.
Copy link to clipboard
Copied
There are scripts out there, but it's a pretty simple loop you can write yourself. Much of how you do it depends on how large a group you are mailing. What is the size of the list?
Copy link to clipboard
Copied
Nothing over 300 recipients, but that number will change. Unfortunately, I have email limitations and may eventually resort to an email marketing system. For now, I'd like to try a simple ready-made script if available, with instructions.
Copy link to clipboard
Copied
Then you just need to search the web for something like 'asp mail list script'. The basic concept is simple. Load the addresses into a recordset, and loop through the recordset adding addresses to the email bcc field. Because mail servers have max address limitations, it also needs to have another loop to break the records into smaller sets of 25-50 addresses.
Copy link to clipboard
Copied
Okay, well it seems I was on the right track then after all. Thank you! I'm sure I could probably handle doing this myself.
Copy link to clipboard
Copied
I've been looking into this, but am missing the full picture of how this would be done all through script.
I currently hand-code my html newsletters in DW, and after viewing in several email clients and browsers, I send them via my personal email client to a group contact list. Super simple. My ISP allows 250 addresses (recipients) per email, 500 max per day.
I think I understand the concept in how email script would pull addresses from a database, but how and from where do I actually email the newsletter? Would I create and save the newsletter as usual, then code the link into the script from, say, an Admin page?
Copy link to clipboard
Copied
You send the html newsletter the same way you say any plain text email via script - except instead of plain text you insert html into the email body. Are you already familiar with using CDOSYS for sending email?
Copy link to clipboard
Copied
I've read about it and know that most ASP email scripts are based on CDOSYS since CDONTS was discontinued, but have no experience with it (yet). A lot of the websites out there like this one - http://w3schools.com/asp/asp_send_email.asp show code examples, but don't provide precise steps on how it all comes together.
So if I've got an html newsletter saved as 'newsletter.htm' and the code set up in a separate asp vbscript file called 'newsletter.asp' (is this step even right?), how is the newsletter actually emailed? Is there a submit button or something? In other words, how do I get the code to do its thing?
I do apologize for this major brain gap I'm having! I've seen and worked with code enough, you'd think I'd get it by now.....
Another thought just occurred to me:
Can this be done if the email addresses are pulled from a database residing on my web host's server, yet emailed through my ISP's mail server?
Copy link to clipboard
Copied
First start by seeing if you can manually send an html email via scripting using this straightforward tutorial.
http://chrishardy.co.uk/asp/tutorials/email-cdosys.asp
>So if I've got an html newsletter saved as 'newsletter.htm'
OK, if you want to store the newsletter content in a separate file from the script that's fine. You will need to use some ASP filesystem functions to read it into a variable that you can place in the email. But don't worry about that for now - just put the html into the newsletter.asp script.
>Is there a submit button or something?
The newsletter.asp script will run, and send the emails, everytime it is loaded into a browser, so make sure it has security to prevent a random web visitor from accessing it. What I have done before is create a form page that has some options to select and a submit. The form is submitted to the newsletter.asp, and the options selected could be used to maybe filter the sql recordset, select a specific version of the newsletter, etc.
>Can this be done if the email addresses are pulled from a
>database residing on my web host's server, yet
>emailed through my ISP's mail server?
Possibly. Read here for sending via remote email server.
http://www.developerbarn.com/asp-code-samples/19-sending-email-using-cdosys-classic-asp.html
Have you also thought of using an email marketing service?: http://email-marketing-service-review.toptenreviews.com/
Takes a lot of the headaches out of the process. They have easy ways to import/sync your current contact lists.
Copy link to clipboard
Copied
Thank you, I will study the tutorial - I'm pretty sure I've come across that tutorial a few times in my research.
Okay, so normally the script is stored with the newsletter itself in an .asp file. That makes sense. Obviously, one must be absolute certain the newsletter is completely ready to go before uploading it since the script will run, which concerns me as much as I test my newsletters and make changes before emailing. Of course, certain code (maito:) could be modified or temporarily eliminated accordingly for testing purposes, I suppose.
I actually joined an email marketing service and started setting up. What irks me (at least with this particular service) is that users can only sign up for subscription items on my site (I offer about seven), but not view or manage those items from my site; they have to link from the newsletter to do that. It would be nice if I could use the email service as well as keep an active user/subscriber database and pull that information into my user's account.
I love the link you sent on comparing email marketing services... thanks!
Copy link to clipboard
Copied
>It would be nice if I could use the email service as well as keep an
>active user/subscriber database and pull that information into my
>user's account.
I believe that some email marketing providers include API's that allow you to sync your site database to email contact database. You could probably also include Unsubscribe and Manage Subs from your site. SnakeEyez02 may know more about this or you might want to start a separate thread.
Copy link to clipboard
Copied
Hmmm....okay. Yeah, I asked the current service I'm with about viewing profiles from my site, and they replied:
"...... The only way the contacts can be able to see their Contact Profile is from the Manage your Subscription page at the bottom of every emails you sent to them. By clicking that option, they can be able to manage their subscription in their Contact Profile....."
I actually belong to another service as well, so maybe I'll ask them. Thanks for all your help!
Copy link to clipboard
Copied
After testing the email service and several asp scripts in the last day, I still feel my method is easiest and quickest. If I decide to continue this method for now (even though it may be unorthodox), is there a way I can have an email sent to myself whenever a user submits the insert record behavior form for subscriptions, so I can just add them to my current contact groups? Hidden fields, maybe, or....?