Solved

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

Posted on 2001-06-06
7
192 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 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

830 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