Solved

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

Posted on 2001-06-06
7
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 7

Accepted Solution

by:
q2eddie earned 150 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
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!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to implement Singleton Design Pattern in Java.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

729 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