473,715 Members | 5,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending mails from asp.net pages

6 New Member
hi every one,
plz help me out, i have to send mails from my asp.net page.... I have tried a code where mails are going only to gmail users

the code is ...

namespace:
using System.Web.Mail ;

protected void btnSend_Click(o bject sender, EventArgs e)
{
MailMessage msg = new MailMessage();
msg.To = txtTo.Text;
msg.From = txtFrom.Text;
msg.Cc = txtcc.Text;
msg.Bcc = txtbcc.Text;
msg.Subject = txtSubject.Text ;
msg.Body = txtContent.Valu e;
lblStatus.Text = "Sending... ";
SmtpMail.Send(m sg);
lblStatus.Text = "Email sent (" + txtSubject.Text + ") to " + txtTo.Text;
}

any thing wrong, plz help me and i also want to put attachment files, try to give code for file attachments in sending mails....

thanking you
Jul 19 '07 #1
2 1387
kenobewan
4,871 Recognized Expert Specialist
Try searching TSDN, there are many posts on sending emails.
Jul 19 '07 #2
Plater
7,872 Recognized Expert Expert
We even have an article!
Jul 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
1986
by: Cpt. Zeep | last post by:
I'm writing small script for sending mail from my web pages. I have heard about security hole in FormMail.pl script which can be used by spammers. I would like to prevent that in my script. Can you give me some suggestions regarding that. Thanx! -- Relaxen und watch das blinkenlights...
10
4982
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are working with we put these mailshots in the bcc field of the mails. This can sometimes cause a problem as we are getting alot of mails bounced back. I would like to write a script to have these emails sent out individually using the to: field of the...
3
6267
by: martin smith | last post by:
Here's the scenario. I'm currently using cdosys/asp to send mail to our SMTP server. We use a product called MailFilter to check for SPAM. It doesn't work very well. If MailFilter isn't working cdosys also has problems and emails don't get sent. As these email are confirmations for customer's bookings this means lots of customers calling to see where their confirmation emails have gone. The root of the problem is MailFilter but that here...
1
1766
by: Jayakumar | last post by:
HI, I am using System.web.mail class in my application to send mails. I am using SMTP server for the same. I can send mail to the intranet addresses, But when i send mails to Hotmail or other domains the mails are not sent. What should i do for the sending mails to hotmail and other accounts. (But if i have send mails to hotmail from my acount then i can send mails. ) Kindly reply for my problems.
7
3518
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server administrator told me to write the emails to the “pickup directory” instead. I know that JMail can do this in ASP, but how do you do this in asp.net? -- --------------------
8
2845
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great Now i work in a company with a MS exchange server and would like to send some e-mails however i can`t get it to work at all error is : ( translated form the dutch language )
1
2153
by: gemma.gill | last post by:
Hi There, I have a button on a form within access that sends a verification e- mail. My problem is that these e-mails are sending from individual user accounts rather than a genieric mailbox. Is there a way to do this? We are using MS Outlook each user has an account set up that gives them a personal mailbox and access to another mailbox "helpdesk". I
3
2377
by: dskinibbyb | last post by:
Hi Everybody, I am sending mail using the new class in .Net 2.0. Here while sending internal mails it is giving me problem. Carriage return, Line feed and Spaces are lost while sending mails. I am using msg.BodyEncoding = System.Text.UTF8Encoding.UTF8 to encode the body. But same code and same mail is going fine , when sent to external mails (Like gmail, yahoo, etc.) Please can anyone help me in solving my problem. I even tried...
8
2642
by: theaj | last post by:
Hi all, I am tryin to send a mail using ASP through my webpage. There are many web-pages that give code which looks like given below... from the code its obvious that we need to modify it with our mail IDs for verification purposes. I did so but still it doesnt seem to work...are their any SMTP related issues in this ? Please guide me to make this code work. One question more....how can we send e-mails from any mail-id without...
0
8823
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8718
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5967
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3175
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.