Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

E-mailing routines to send mail to a list read from a database

Posted on 2001-06-06
7
Medium Priority
?
205 Views
Last Modified: 2013-11-13
Hi,

I was wondering if anyone has any e-maling routines to mass mail recipients reading from a database. We are a reasearch company and have our online panel (we don't spam) and we'd like to e-mail them directly from our database.

I have tried some sample code using winsock routines but can't seem to send to addresses like hotmail or yahoo.

I would greatly appreciate it if anyone has any routines or examples of how to do this best, that is, read recipient details and send them an e-mail.

Thanks,
Ben
0
Comment
Question by:Bennie
7 Comments
 
LVL 7

Accepted Solution

by:
q2eddie earned 600 total points
ID: 6161903
A similar question was asked earlier today.

#Links
1. "Question: Automated Email within VB"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20130725

Bye. -e2
0
 

Author Comment

by:Bennie
ID: 6161943
q2eddie,

I've tried similar routines but I can't seem to be able to rech hotmail, yahoo and similar services. Does anyone have any idea why or how to reach them?

Thanks,
Ben
0
 
LVL 7

Expert Comment

by:q2eddie
ID: 6161956
Hi, Bennie.

#Questions
1. Are you able to reach pop accounts?
For example:
ISP accounts, corporate accounts (such as Lotus Notes or Outlook)

2. Do you have Lotus Notes client on your PC?

#Comments
For some reason, mapi does not work on my PC.  It does have a Lotus Notes client on it.  I can programmatically send e-mail out to any account through either the Lotus Notes automation classes or the Mabry Mail object.

That's weird that you can't send out to free web-based e-mail services.

Bye. -e2
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:kahlean
ID: 6162048
This link will give you and idea of how to send mass email through vb project. I use this sample code
to create a newsletter applcation using vb. Very useful

http://www.siteexperts.com/tips/backend/ts12/page1.asp

If you need any further infromation, just ask. I am at home, so i dont have the code with me, so just
can give you a link here

REgards
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6162052
infact the script of sending email is store in a vbscript file . THe script file contains the connection information to your email datatabase as well the link to yuor mail text content. To invoke the script type

c:\windows\csript.exe email.vbs

This code can be use for asp as well as vb application




0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6162490
ping..
0
 
LVL 1

Expert Comment

by:Ranger2081200
ID: 6162919
I have used the following to send mass emails using Outlook and have reached outside services.  This code loops through the database table or email address.
strEmailMessage is the message to send.
fields(0) is the recipients name field.
fields(1) is the recipients email address.

Private sub send_mail()

dtaEmail.RecordSource = "select * from [EmailNotification]"
dtaEmail.Refresh
dtaEmail.Recordset.MoveLast
dtaEmail.Recordset.MoveFirst

For X = 0 To dtaEmail.Recordset.RecordCount - 1
   
    strMailName = dtaEmail.Recordset.Fields(0)
    strEmailName = dtaEmail.Recordset.Fields(1)
    MAPISession1.LogonUI = False
    MAPISession1.UserName = "MICROSOFT OUTLOOK"
    MAPISession1.SignOn
    mail.SessionID = MAPISession1.SessionID
    mail.Compose
    mail.RecipDisplayName = strMailName
    mail.RecipAddress = strEmailName
    mail.ResolveName
    mail.MsgSubject = "Attention!"
    'Create the message
    mail.MsgNoteText = strEmailMessage
    mail.Send False
    MAPISession1.SignOff
    dtaEmail.Recordset.MoveNext
Next

end sub

Later...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to implement Singleton Design Pattern in Java.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question