C# Application - How to send an email | FoxLearn
Vložit
- čas přidán 7. 09. 2024
- How to send an email in c#. send e-mail via SMTP using C#, sending email in .NET through Gmail, sending email through SMTP. The C# Basics beginner course is a free C# Tutorial Series that helps beginning programmers learn the basics of the C# Programming Language.
How to send email using c#
C# Tutorial: Email Sender [Send e-mails using C#]
C# - How To Send An Email Using C# [with source code]
How to Send SMTP Email from Computer to Webmail using C#
Dude, you saved me.
For hours i have been trying to do this, but Gmail block me. The tip for allow less secure apps works for me.
Thanks!
You're welcome. Thank you !
it's not working with me and there is no error on send what is the problem
Thank you! It has been difficult to find a good, simple example of how to execute sending email in C#. This worked for me just fine. I plan to use it in another program to send auto-mails to myself as notifications.
czcams.com/video/p5ZOHvIbYJc/video.html
make a loop, add the send function in there and done, you now have an email spammer
Can someone please help me whenever I send it says '@' is a invalid charector. 9:01 it was typed. what is it for? its not working can someone pls help meh
Just type there the email adrress
Muy buen video! Muchas gracias por el aporte. The video is very good! ThankYou very much, sorry for my english, is not good.
Ok. You're welcome. Thank you so much ^_^
thank you works like a charm :) easy and usefull thank you soo much
Thank you so much ^_^
can u forward source code to me
amitbalbatti@gmail.com
Sent. Thank you
I'm getting an error"FormatException was not unhandled"
The specified string is not in the form required for an e-mail address.
Could you please help?
Hi, Please check your email format, and try again. thanks
I'm having a problem with "client.Port = Convert.ToInt32(txtPort.Text);".
System.FormatException: 'A cadeia de caracteres de entrada não estava em um formato correto.'
What can I do?
Can i add any ads on my c# application
Love u. Worked Awesome As expected.
+DIPAK AKHADE Thank you very much :)
Great video. As usually. Thank you very much.
Now we know how to send mails.
And how can we arrange a mail receiving?
Thank you for your suggestion. Let me try to research
you all probably dont give a damn but does any of you know of a way to get back into an instagram account..?
I stupidly lost the account password. I would appreciate any tips you can offer me.
@Cade Thomas Instablaster ;)
@Lewis Boston Thanks so much for your reply. I found the site through google and Im trying it out now.
Takes a while so I will get back to you later when my account password hopefully is recovered.
@Lewis Boston It worked and I actually got access to my account again. I'm so happy!
Thank you so much, you really help me out :D
The tutorial is great and it is simple. I saw that you have CC textbox there but didn't used it. So, I want to ask if that is working for multiple email sending. Like I can input 5 email address at the CC textbox and send it. Please make us a tutorial. Thank you!
Hi, You can split email, and you can use foreach to send email. thanks
czcams.com/video/p5ZOHvIbYJc/video.html
Thank you very much... But I cant't open the project (I only can open the app).
i USE c# 2010 is that the reason why? (Because you made it on a2013 edition). And, when I run the app, there's that 5.5.1 error (authentification)... Do you have any clues? do i have to add a line on the code? If yes, which one? I tried with 25th port and also 465 but still doesn't work
Kind regards
Hi!!
It worked for me, thank you very much...
Just one thing, if all textboxes are empty, how can I prevent an error that appears if I click send without any textbox filled?
I hope you understand my question
You're welcome. Thank you !
I tried but this message was appeared to me "The SMTP host was not found"
thanks a lot
Hello i want to send the email and sms to mutiple user which exist into the database using c# so Can u help me....
can u help . its giving an error. The specified string is not in the form required for an e-mail address. plz help
this message was appeared to me "The SMTP host was not found"
In the textbox of the username, It is my user and password from my computer or from my email account?
Perfect! 100%
Thanks a lot! It helps ;)
czcams.com/video/p5ZOHvIbYJc/video.html
What if I want to add an attachment to the email?
thank you,this is working ))
+Elman Ehmedov Thank you ^_^
thanks alot but plz help me how to make it that i could be able to send mail to multy mail acount like using loop or a list of mails
OK. Thank you for your suggestion. I'll upload soon !
@@foxlearn I'm waiting
Thanks it's works
Thanks :)
Thanks...........
Thank you :)
FormatExecption was unhandled: The Specified string is not in the form required for an email address.
hi fox learn , am getting this error , can you please help me, i have followed every step of this tutorial , yet this error.
same error
I can't allow less secure apps now.
please, I have an error saying, System.FormatException: 'An invalid character was found in the mail header: '@'.' please, I need the source code.
I think you miss something. Please check your code again. thank you !
The string userstate = "Sending..."; command is causing it to throw an unknown command error.
Same here what to do ??
hi, nice video but in mine says -"an invalid character was found in the mail header ". Can someone tell me what to do?
I think you miss something. Please check your code again. thank you !
Do we need internet connection for sending mail
shaik ashar i followed the tutorial. when i click the send buttuon, it repeats sending several times. And i got many emails...T.T
NO :)
This is the dumbest question I have ever seen at the top of a comment section.
YES, you need a connection to send email. It's kind of a given.
not at all :')
nah just use ur magic wand
My Google account has two-step verification. Can I add something to that code to add the authorization key?
Hi, You need to turn on google service allows you to send an email via code. Thanks
How do I enable the sending mail feature on my GMAIL account ? I get the 5.5.1 error :/
+Raphaël Queiroz Hi, I showed how to activate Gmail allows you to send emails in this video. Thanks
Thank you so much sir , bless you
You're welcome. Thank you !
your video inspire me so much, thank you
@@foxlearn Thank you sir
still getting'
Unable to connect to remote server
Connection could not be made because the target machine actively refused it
Hi, You need to setting allow google send email, please check your code again. thanks
Hi.. can you tell me how to send customize email..Like change color or font size?
You need to send email with html format
@@foxlearn How can i do this using C# ?
For example
msg = new MailMessage("xxxx@gmail.com",
"yyyy@gmail.com", "Message",
"This is test message" +
"this is bold text !" +
"This is some text !"
);
msg.IsBodyHtml = true;
There Comes an error: Ein Ausnahmefehler des Typs "System.Reflection.TargetInvocationException" ist in mscorlib.dll aufgetreten.
Hi, Please check your code again. Make sure it's correct. thanks
+Fox Learn maybe you can send me the Code per email: zerokeks@gmail.com, i dont Know where the Problem is
Sent. Thanks :)
hi, I got the error "The SMTP host was not found." What should i do ???
Hi. What SMTP host are you using ? thanks
WHAT SHOULD I TYPE IN THE USERNAME
Your user name mail
@@foxlearn Can you give me an example please
I HAVE AN ERROR:
The specified string is not in the form required for an e-mail address.
can any one solve it?
+Ikhlaq Ahmed Hi, You need to register an account before playing. Thank you !
+Fox Learn Are you referring to Google Account? Thank you!
Its awesome, but need it with attachement !!!
+Ivo Donckers Hi, Thank you for your suggestion. I'll make the tutorial as soon as possible :)
Hi! I'm getting an error. It says that "The SMTP host was not found."
Hi, What SMTP server are you using? thanks
Mochahost
can somebody send me code please? Very good tutorial
Please create video tutorial to receive e-mails also
You can view this video czcams.com/video/KFQGiOzNafQ/video.html . to know how to receive an email. Thank you !
line 34 is an error why ?
what will we write in username and password .. i am facing error in username and password ..
your gmail account, thanks
thank you sir
Code is working fine until or unless you add a reference on top
using System.Web;
then this code works.
Thank you !
This is great but I am receiving an error.
Would you kindly send me the source code so that I may compare? :D
czcams.com/video/p5ZOHvIbYJc/video.html
plz give source file
IS GIVE ME FAILURE SENDING MAIL PLEASE HELP ME I NEED IT FOR MAY PROJECT
THANK YOU
Hi. Which mail server are you sending? thanks
stmp.live.com
private void btnSend_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = new MailMessage(txtFrom.Text, txtTo.Text, txtSubject.Text, textBox7.Text);
SmtpClient client = new SmtpClient(txtSmtp.Text);
client.Port = 465;
client.Credentials = new System.Net.NetworkCredential(txtUsern.Text, txtPass.Text);
client.EnableSsl = true;
client.Send(mail);
MessageBox.Show("mail sent", "success", MessageBoxButtons.OK);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
hai i m getting error, unable to connect remote server. plz get me solution
Hi, What mail server are you using ? thanks
I m using Gmail only, is there any other seetiings need to do. Thanks
Hi, You can go your gmail setting, then enable send email from your application. thanks
Hi, sry I didn't get you, in settings what I need to enable. can plz elaborate. thanks for your quick response
Sir plss send the code
Please do it or you can find code from my website
it's showing 5.5.1 authentication error :(
+Test Mail Hi, Please check your code again. Remember enable feature allows you send mail in Gmail config. Thank you !
May i have the source code? thanks.
copy what he does in the video
lol
How to send mail to multiple c # recipients
pleas!!!!!!!!!!!!
Hi, You can use loop or add multiple address with ',' or ';' character
give me the source code and how i will fix cs error?
What's your email? thank you
how to receive email ? in C# please make a tutorial on it :(
+mehran shafqat Hi, You can view czcams.com/video/KFQGiOzNafQ/video.html to know how to receive an email in C#. Thanks
with pop3 or imap ? receive email from gmail ?
+mehran shafqat Yes, That's right
@@mehranshafqat997 pop3 or imap? Yes that's right))))
Your voice was different a little from now.
Yes, Thank you !
hai, I am getting the error. Can U send me the code
Hi, What's your email? Thank you
shiv02289@gmail.com
Sent. Thank you
What's your password ?
Who the hell is Lucy in MailAddress?
Your email, you can change your name
can you please send me the code?
Hi, What's your email? thanks
from ?? error
Hi, What error are you getting? Thank you
I put the 333th like
Thank you !
How do we get username and password ?
You should create a gmail account, then you can play demo. Thank you !
@@foxlearn ah I see. Thank you so much for your respond.
But then I get an erorr when I click button Send :
"The SMTP connection resquires a secure connection or the client was not authorized".
What should I do ?
Which mail server are you using? gmail, yahoo...etc. You can post your question at c-sharpcode.com .I'll try to answer as soon as possible. Thank you !
@@foxlearn I've post my question just now. Could you please check it and help me :D
Can you send the codes? thank u
Hi, What's your email? Thanks
Fox Learn kathleenortega1002@yahoo.com.ph thank you!
username and password ?
Hi, You can use www.watools.es/ to generate a whatsapp account. Thanks
is given me error 5.5.1
+samuel boateng What's your mail server name ? yahoo, google...?
google
+samuel boateng Have you enabled google allow send email ?
how is it done ?
i did allow insecure apps to send messages thought.
+samuel boateng Hi, Please make sure your code is correct, check your port again