Text version of the video
All ASP .NET Text Articles
All ASP .NET Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In the previous session, we discussed about sending emails using asp.net. All the SMTP server settings were configured in code. In this session, we will discuss about specifying these settings in web.config file.
Since the SMTP server settings are now configured in web.config. In code all you have to do is
1. Create an instance of the MailMessage class. Specify the FROM & TO email address, subject and Body
2. Create an instance of SmtpClient class, and send the email using Send() method. The SMTP settings will be automatically picked up from web.config file, when sending email.
SendEmail() method code
public static void SendEmail(string emailbody)
// Specify the from and to email address
MailMessage mailMessage = new MailMessage
("[email protected]", "[email protected]");
// Specify the email body
mailMessage.Body = emailbody;
// Specify the email Subject
mailMessage.Subject = "Exception";
// No need to specify the SMTP settings as these
// are already specified in web.config
SmtpClient smtpClient = new SmtpClient();
// Finall send the email message using Send() method
Wow! Venkat, thanks to You, I enjoy learning more than anything else! When I can chose learning or reading a book or listening to music, I rather chose your tutorials, because they are pure entertainment!
I want to send multiple mail automattically,
But one issue ill get mail as per the basis of the i want to send like,
I will receive mail like for Example
FROM: [email protected]
BODY: mail contains ([email protected])
->What i want to do means i want to take the [email protected] from the mail body.
->And write new mail for the TO:[email protected] with some mail looks like this for example:
FROM: [email protected]
Subject: Some things.
->By automatically can possible do by mail server or any ways to do it.
Please help me on this.
Thanks in advance.
I have wrote your code and it works as a charm from my home. But in my school when I tried to start the same code I have problem, because my internal network is not allowing me to send mail on any address. In exception, where I catch why it's not sending, says just "Failure sending mail." which means nothing to me. I am almost 100% sure that my internal network is blocking me from connecting on gmail to send mail from that server. Any suggestion, I would appreciate a lot.
I have watched all your videos on Asp, very good job, thank you a lot for all your work.
Thank you for this video. However, I need to know how to send multiple emails to different email addresses with unique attachment(pdf file) in each email. Should I create multiple instances of MailMessage class? Any thoughts would be helpful. I am planning to use SmtpClient class to send emails.
Poloniex xBTCe Bitfinex Quoine BitMEX Kraken BTC-E Bithumb Coincheck GDAX bitFlyer Zaif Coinone Bitstamp Korbit OKCoin.cn Gemini Yunbi Bittrex CHBTC.
Buying and selling.
4. Finding a market.
Now all you need to do is find your desired market, in which you will trade a certain amount for another cryptocurrency. Before placing an order, make sure you properly analyze the market, and agree with the current best price. If there are enough available tokens at your eligible price, your order will be immediately taken care of. If not, your order will be waiting for someone to trade at your desired price.
5. Trading on Poloniex.
It is also possible to mine specific cryptocurrencies so you can trade them. Although popular coins such as bitcoin can be ruled out for most users, currencies such as Monero and Bytecoin are optimized for CPU mining, and pretty much everyone can get a few coins.
Finally, it is possible to earn Steem by blogging on the Steemit platform, or to earn Siacoin by sharing your available disk space with users all over the world via the Sia platform.
You may like.
You must be logged in to post a comment Login.
Leave a Reply.
You must be logged in to post a comment.
Advertising, Big Data and You.