Introducing DotNetFunda.com on mobile http://m.dotnetfunda.com ! Be with DotNetFunda.com on the go !
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 7740 |  Welcome, Guest!   Register  Login
Home > Articles > ASP.NET > Bulk Email sending through Gmail

Bulk Email sending through Gmail

Article posted by Ganeshji on 8/22/2010 | Views: 5217 | Category: ASP.NET | Level: Beginner | Points: 150 red flag


In this article, i have tried to show , 'how to send bulk email using Gmail'.

Download


 Download source code for Bulk Email sending through Gmail



Introduction


Nowadays, bulk mailing is a major concern for the business persons.  Every feature has its advantages and disadvantages of its own. Bulk email is also termed as ‘Spam Mailing’. Using this feature, one can make grand advertisements, send newsletters,etc.

    The disadvantage is that, it may not available in the inbox of the recipient, instead it may be available in the spam folder, where the chance of noticing the mail is very less. This is actually done by bulk email blocker programmed into email accounts.

    Advantage of bulk mailing is that, very less time is spend for sending mail to so many recipients.

In this article, I will show you , how to send bulk-mail using Gmail.

 

Requirements:


Namespace to send Mail

System.Net.Mail;

A relay server is required to send email. A relay is a service that allows us to send email. It is a mail server, or a specialized SMTP server/service that can deal with sending mails. System.Net.Mail only sends the mail to a relay server, and finally the relay server delivers it to the final destination.

If we want to go for third party SMTP server, for sending emails, then one of the good solution is Gmail. SMTP and POP access are being provided by Gmail, which can be used for receiving and sending emails. Here, I am using a gmail account, for sending email by SMTP.

Limitation:

One can send limited number of emails daily to selected people. Sending of mails to unlimited number of persons is restricted by the anti-spamming engine of gmail.


Before sending mail





After sending mail successfully





Contents of tblContactDetails. Actually i have saved all the email ids in a table.






Namespaces required for my example




Connection string, variables and arraylist declaration




Button click event


Here, i have selected the emailid field from the tblContactDetails and added into the arraylist named Email_List. That is the recipient list is being created here.




Method for sending bulk mails.


Here i have simply attached an attachment file which is being saved at D:\\temp\\ location. I needed my gmail email id and password.




Note:

Using  my example, recipient won't see that it is a mass mail. Only sender can send mass mail with this example. but recipient won't be able to see, who else is the recipient of this mail.


Reference:

http:// www. codeproject. com/KB/aspnet/SMTPGmail.aspx

http://www. c-sharpcorner. com/UploadFile/sangeeta92/109102009051032AM/1.aspx



If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:



Please Sign In to vote for this post.

Experience:1 year(s)
Home page:
Member since:Saturday, July 24, 2010
Level:Starter
Status: [Member]
Biography:
>> Write Response - Respond to this post and get points
Related Posts

In this article, I tried to explore the new feature URL Routing of ASP.NET 4.0.

In asp.net the FileUpload Field doesnot provied a way to clear its input the conventional way other controls do.

To get the primary ke value of the GridView records in JavaScript, we can follow this approach.

The State or Cache Management is nothing but the way to storing the data in Client-Side and in Server-Side using preity small memory.

Transforming the report output into PDF is an easy task now.

More ...
About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2012 8:32:00 AM