Solved

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

Posted on 2001-06-06
7
196 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

627 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