C# Application - How to send an email | FoxLearn

  Рет қаралды 93,747

Fox Learn

Fox Learn

Күн бұрын

Пікірлер: 375
@obsilva
@obsilva 8 жыл бұрын
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!
@foxlearn
@foxlearn 8 жыл бұрын
You're welcome. Thank you !
@nickharris423
@nickharris423 7 жыл бұрын
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
@andyglbrt
@andyglbrt 6 жыл бұрын
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.
@santiepelayo6313
@santiepelayo6313 5 жыл бұрын
kzbin.info/www/bejne/pma9gHusfseMgMU
@JS-nr5te
@JS-nr5te 5 жыл бұрын
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
@foxlearn
@foxlearn 5 жыл бұрын
You're welcome. Thank you !
@abdulrahmanabdullah127
@abdulrahmanabdullah127 Жыл бұрын
I tried but this message was appeared to me "The SMTP host was not found"
@joshuadelacruz3907
@joshuadelacruz3907 7 жыл бұрын
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!
@foxlearn
@foxlearn 7 жыл бұрын
Hi, You can split email, and you can use foreach to send email. thanks
@santiepelayo6313
@santiepelayo6313 5 жыл бұрын
kzbin.info/www/bejne/pma9gHusfseMgMU
@AmanKumar-bi4jl
@AmanKumar-bi4jl 3 жыл бұрын
Can i add any ads on my c# application
@vexxy9879
@vexxy9879 4 жыл бұрын
make a loop, add the send function in there and done, you now have an email spammer
@abdallahmamdouh2270
@abdallahmamdouh2270 4 жыл бұрын
it's not working with me and there is no error on send what is the problem
@lucasbraga8569
@lucasbraga8569 6 жыл бұрын
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?
@ivannarykin
@ivannarykin 4 жыл бұрын
Great video. As usually. Thank you very much. Now we know how to send mails. And how can we arrange a mail receiving?
@foxlearn
@foxlearn 4 жыл бұрын
Thank you for your suggestion. Let me try to research
@cadethomas142
@cadethomas142 3 жыл бұрын
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.
@lewisboston6014
@lewisboston6014 3 жыл бұрын
@Cade Thomas Instablaster ;)
@cadethomas142
@cadethomas142 3 жыл бұрын
@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.
@cadethomas142
@cadethomas142 3 жыл бұрын
@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
@adulwahabkhan8543
@adulwahabkhan8543 7 жыл бұрын
Hello i want to send the email and sms to mutiple user which exist into the database using c# so Can u help me....
@dipakakhade4636
@dipakakhade4636 8 жыл бұрын
Love u. Worked Awesome As expected.
@foxlearn
@foxlearn 8 жыл бұрын
+DIPAK AKHADE Thank you very much :)
@lucyacuna8876
@lucyacuna8876 7 жыл бұрын
In the textbox of the username, It is my user and password from my computer or from my email account?
@coleykat312
@coleykat312 3 жыл бұрын
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
@ycanatilgan
@ycanatilgan 2 жыл бұрын
Just type there the email adrress
@gametrolling2746
@gametrolling2746 8 жыл бұрын
thank you works like a charm :) easy and usefull thank you soo much
@foxlearn
@foxlearn 8 жыл бұрын
Thank you so much ^_^
@rahulbalbatti
@rahulbalbatti 8 жыл бұрын
can u forward source code to me amitbalbatti@gmail.com
@foxlearn
@foxlearn 8 жыл бұрын
Sent. Thank you
@JonathanIsmaila
@JonathanIsmaila Жыл бұрын
What if I want to add an attachment to the email?
@chocchocgaming7788
@chocchocgaming7788 8 жыл бұрын
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?
@foxlearn
@foxlearn 8 жыл бұрын
Hi, Please check your email format, and try again. thanks
@mzzdiscovery
@mzzdiscovery 5 жыл бұрын
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
@foxlearn
@foxlearn 5 жыл бұрын
OK. Thank you for your suggestion. I'll upload soon !
@mzzdiscovery
@mzzdiscovery 5 жыл бұрын
@@foxlearn I'm waiting
@muhammadhassaan262
@muhammadhassaan262 5 жыл бұрын
Hi.. can you tell me how to send customize email..Like change color or font size?
@foxlearn
@foxlearn 5 жыл бұрын
You need to send email with html format
@muhammadhassaan262
@muhammadhassaan262 5 жыл бұрын
@@foxlearn How can i do this using C# ?
@foxlearn
@foxlearn 5 жыл бұрын
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;
@nabeelsiddiqui5726
@nabeelsiddiqui5726 6 жыл бұрын
can u help . its giving an error. The specified string is not in the form required for an e-mail address. plz help
@MrRamonGimenez
@MrRamonGimenez 8 жыл бұрын
Muy buen video! Muchas gracias por el aporte. The video is very good! ThankYou very much, sorry for my english, is not good.
@foxlearn
@foxlearn 8 жыл бұрын
Ok. You're welcome. Thank you so much ^_^
@shaikashra8443
@shaikashra8443 7 жыл бұрын
Do we need internet connection for sending mail
@김건환-k2t
@김건환-k2t 7 жыл бұрын
shaik ashar i followed the tutorial. when i click the send buttuon, it repeats sending several times. And i got many emails...T.T
@abdulwahabkhan6526
@abdulwahabkhan6526 7 жыл бұрын
NO :)
@Dubswitcher
@Dubswitcher 6 жыл бұрын
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.
@ahmedfares1284
@ahmedfares1284 6 жыл бұрын
not at all :')
@companionpuppy7539
@companionpuppy7539 5 жыл бұрын
nah just use ur magic wand
8 жыл бұрын
My Google account has two-step verification. Can I add something to that code to add the authorization key?
@foxlearn
@foxlearn 8 жыл бұрын
Hi, You need to turn on google service allows you to send an email via code. Thanks
@zkiat93
@zkiat93 7 жыл бұрын
Thanks a lot! It helps ;)
@santiepelayo6313
@santiepelayo6313 5 жыл бұрын
kzbin.info/www/bejne/pma9gHusfseMgMU
@figenasil
@figenasil 3 жыл бұрын
thanks a lot
@elmanehmedov3308
@elmanehmedov3308 8 жыл бұрын
thank you,this is working ))
@foxlearn
@foxlearn 8 жыл бұрын
+Elman Ehmedov Thank you ^_^
@abdulrahmanabdullah127
@abdulrahmanabdullah127 Жыл бұрын
this message was appeared to me "The SMTP host was not found"
@hridaysen1748
@hridaysen1748 5 жыл бұрын
hi, nice video but in mine says -"an invalid character was found in the mail header ". Can someone tell me what to do?
@foxlearn
@foxlearn 5 жыл бұрын
I think you miss something. Please check your code again. thank you !
@adilkevin6220
@adilkevin6220 6 жыл бұрын
Please create video tutorial to receive e-mails also
@foxlearn
@foxlearn 6 жыл бұрын
You can view this video kzbin.info/www/bejne/gXe0eJyFr7OUnLM . to know how to receive an email. Thank you !
@MamaEstaPresaPunk
@MamaEstaPresaPunk 4 жыл бұрын
Perfect! 100%
@osamashahnawaz1528
@osamashahnawaz1528 8 жыл бұрын
Thanks it's works
@foxlearn
@foxlearn 8 жыл бұрын
Thanks :)
@deffog4rno
@deffog4rno 4 жыл бұрын
WHAT SHOULD I TYPE IN THE USERNAME
@foxlearn
@foxlearn 4 жыл бұрын
Your user name mail
@deffog4rno
@deffog4rno 4 жыл бұрын
@@foxlearn Can you give me an example please
@johnbritto9950
@johnbritto9950 7 жыл бұрын
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.
@xxwilly_proxx2917
@xxwilly_proxx2917 7 жыл бұрын
same error
@ivodonckers25
@ivodonckers25 8 жыл бұрын
Its awesome, but need it with attachement !!!
@foxlearn
@foxlearn 8 жыл бұрын
+Ivo Donckers Hi, Thank you for your suggestion. I'll make the tutorial as soon as possible :)
@telladesina100
@telladesina100 5 жыл бұрын
please, I have an error saying, System.FormatException: 'An invalid character was found in the mail header: '@'.' please, I need the source code.
@foxlearn
@foxlearn 5 жыл бұрын
I think you miss something. Please check your code again. thank you !
@InFeCteDZC
@InFeCteDZC 8 жыл бұрын
There Comes an error: Ein Ausnahmefehler des Typs "System.Reflection.TargetInvocationException" ist in mscorlib.dll aufgetreten.
@foxlearn
@foxlearn 8 жыл бұрын
Hi, Please check your code again. Make sure it's correct. thanks
@InFeCteDZC
@InFeCteDZC 8 жыл бұрын
+Fox Learn maybe you can send me the Code per email: zerokeks@gmail.com, i dont Know where the Problem is
@foxlearn
@foxlearn 8 жыл бұрын
Sent. Thanks :)
@raphaelqueiroz7925
@raphaelqueiroz7925 8 жыл бұрын
How do I enable the sending mail feature on my GMAIL account ? I get the 5.5.1 error :/
@foxlearn
@foxlearn 8 жыл бұрын
+Raphaël Queiroz Hi, I showed how to activate Gmail allows you to send emails in this video. Thanks
@karenspania120
@karenspania120 8 жыл бұрын
hi, I got the error "The SMTP host was not found." What should i do ???
@foxlearn
@foxlearn 8 жыл бұрын
Hi. What SMTP host are you using ? thanks
@tahakara2358
@tahakara2358 2 жыл бұрын
I can't allow less secure apps now.
@mariembenzineb4522
@mariembenzineb4522 6 жыл бұрын
Thank you so much sir , bless you
@foxlearn
@foxlearn 6 жыл бұрын
You're welcome. Thank you !
@HappyPlay-Play
@HappyPlay-Play 5 жыл бұрын
your video inspire me so much, thank you
@3dgiftz
@3dgiftz 3 жыл бұрын
@@foxlearn Thank you sir
@jlmercado6062
@jlmercado6062 8 жыл бұрын
Hi! I'm getting an error. It says that "The SMTP host was not found."
@foxlearn
@foxlearn 8 жыл бұрын
Hi, What SMTP server are you using? thanks
@jlmercado6062
@jlmercado6062 7 жыл бұрын
Mochahost
@cryptojetsoftwaresolution9155
@cryptojetsoftwaresolution9155 7 жыл бұрын
Thanks...........
@foxlearn
@foxlearn 7 жыл бұрын
Thank you :)
@Dubswitcher
@Dubswitcher 6 жыл бұрын
The string userstate = "Sending..."; command is causing it to throw an unknown command error.
@nusrat768
@nusrat768 5 жыл бұрын
Same here what to do ??
@ikhlaqahmed6318
@ikhlaqahmed6318 8 жыл бұрын
I HAVE AN ERROR: The specified string is not in the form required for an e-mail address. can any one solve it?
@foxlearn
@foxlearn 8 жыл бұрын
+Ikhlaq Ahmed Hi, You need to register an account before playing. Thank you !
@shubhampande648
@shubhampande648 8 жыл бұрын
+Fox Learn Are you referring to Google Account? Thank you!
@coronakit
@coronakit 6 жыл бұрын
can somebody send me code please? Very good tutorial
@larrym.williams2259
@larrym.williams2259 8 жыл бұрын
what will we write in username and password .. i am facing error in username and password ..
@foxlearn
@foxlearn 8 жыл бұрын
your gmail account, thanks
@larrym.williams2259
@larrym.williams2259 8 жыл бұрын
thank you sir
@ilzrogacha3638
@ilzrogacha3638 4 жыл бұрын
May i have the source code? thanks.
@prod.thakidd
@prod.thakidd 3 жыл бұрын
copy what he does in the video lol
@dailystudysupply9963
@dailystudysupply9963 8 жыл бұрын
still getting' Unable to connect to remote server Connection could not be made because the target machine actively refused it
@foxlearn
@foxlearn 8 жыл бұрын
Hi, You need to setting allow google send email, please check your code again. thanks
@inframatic
@inframatic 7 жыл бұрын
This is great but I am receiving an error. Would you kindly send me the source code so that I may compare? :D
@santiepelayo6313
@santiepelayo6313 5 жыл бұрын
kzbin.info/www/bejne/pma9gHusfseMgMU
@mongii2
@mongii2 4 жыл бұрын
Your voice was different a little from now.
@foxlearn
@foxlearn 4 жыл бұрын
Yes, Thank you !
@1ryqw989
@1ryqw989 4 жыл бұрын
line 34 is an error why ?
@anjibabupsr4160
@anjibabupsr4160 8 жыл бұрын
hai i m getting error, unable to connect remote server. plz get me solution
@foxlearn
@foxlearn 8 жыл бұрын
Hi, What mail server are you using ? thanks
@anjibabupsr4160
@anjibabupsr4160 8 жыл бұрын
I m using Gmail only, is there any other seetiings need to do. Thanks
@foxlearn
@foxlearn 8 жыл бұрын
Hi, You can go your gmail setting, then enable send email from your application. thanks
@anjibabupsr4160
@anjibabupsr4160 8 жыл бұрын
Hi, sry I didn't get you, in settings what I need to enable. can plz elaborate. thanks for your quick response
@mehranshafqat997
@mehranshafqat997 8 жыл бұрын
how to receive email ? in C# please make a tutorial on it :(
@foxlearn
@foxlearn 8 жыл бұрын
+mehran shafqat Hi, You can view kzbin.info/www/bejne/gXe0eJyFr7OUnLM to know how to receive an email in C#. Thanks
@mehranshafqat997
@mehranshafqat997 8 жыл бұрын
with pop3 or imap ? receive email from gmail ?
@foxlearn
@foxlearn 8 жыл бұрын
+mehran shafqat Yes, That's right
@Максим-в3х8к
@Максим-в3х8к 4 жыл бұрын
@@mehranshafqat997 pop3 or imap? Yes that's right))))
@tayyabarsalan8557
@tayyabarsalan8557 5 жыл бұрын
Code is working fine until or unless you add a reference on top using System.Web; then this code works.
@foxlearn
@foxlearn 5 жыл бұрын
Thank you !
@yeakleang
@yeakleang 7 жыл бұрын
Who the hell is Lucy in MailAddress?
@foxlearn
@foxlearn 7 жыл бұрын
Your email, you can change your name
@Hb-sl8xr
@Hb-sl8xr 7 жыл бұрын
IS GIVE ME FAILURE SENDING MAIL PLEASE HELP ME I NEED IT FOR MAY PROJECT THANK YOU
@foxlearn
@foxlearn 7 жыл бұрын
Hi. Which mail server are you sending? thanks
@Hb-sl8xr
@Hb-sl8xr 7 жыл бұрын
stmp.live.com
@Hb-sl8xr
@Hb-sl8xr 7 жыл бұрын
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); }
@NightTV
@NightTV 7 жыл бұрын
give me the source code and how i will fix cs error?
@foxlearn
@foxlearn 7 жыл бұрын
What's your email? thank you
@sofianeaboulfida9085
@sofianeaboulfida9085 7 жыл бұрын
How to send mail to multiple c # recipients pleas!!!!!!!!!!!!
@foxlearn
@foxlearn 7 жыл бұрын
Hi, You can use loop or add multiple address with ',' or ';' character
@sardarmemon6842
@sardarmemon6842 Жыл бұрын
plz give source file
@shivkumar-hh5tk
@shivkumar-hh5tk 7 жыл бұрын
hai, I am getting the error. Can U send me the code
@foxlearn
@foxlearn 7 жыл бұрын
Hi, What's your email? Thank you
@shivkumar-hh5tk
@shivkumar-hh5tk 7 жыл бұрын
shiv02289@gmail.com
@foxlearn
@foxlearn 7 жыл бұрын
Sent. Thank you
@testmail1445
@testmail1445 8 жыл бұрын
it's showing 5.5.1 authentication error :(
@foxlearn
@foxlearn 8 жыл бұрын
+Test Mail Hi, Please check your code again. Remember enable feature allows you send mail in Gmail config. Thank you !
@rinnesm7419
@rinnesm7419 6 жыл бұрын
How do we get username and password ?
@foxlearn
@foxlearn 6 жыл бұрын
You should create a gmail account, then you can play demo. Thank you !
@rinnesm7419
@rinnesm7419 6 жыл бұрын
@@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 ?
@foxlearn
@foxlearn 6 жыл бұрын
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 !
@rinnesm7419
@rinnesm7419 6 жыл бұрын
@@foxlearn I've post my question just now. Could you please check it and help me :D
@sriharsha9958
@sriharsha9958 3 жыл бұрын
Sir plss send the code
@foxlearn
@foxlearn 3 жыл бұрын
Please do it or you can find code from my website
@DavidStefan-nz2en
@DavidStefan-nz2en 8 жыл бұрын
can you please send me the code?
@foxlearn
@foxlearn 7 жыл бұрын
Hi, What's your email? thanks
@innadipus4123
@innadipus4123 7 жыл бұрын
Can you send the codes? thank u
@foxlearn
@foxlearn 7 жыл бұрын
Hi, What's your email? Thanks
@innadipus4123
@innadipus4123 7 жыл бұрын
Fox Learn kathleenortega1002@yahoo.com.ph thank you!
@dydo2331
@dydo2331 3 жыл бұрын
What's your password ?
@carisaputri4658
@carisaputri4658 7 жыл бұрын
from ?? error
@foxlearn
@foxlearn 7 жыл бұрын
Hi, What error are you getting? Thank you
@ОтгонбаатарМөнхтөгс
@ОтгонбаатарМөнхтөгс 8 жыл бұрын
username and password ?
@foxlearn
@foxlearn 8 жыл бұрын
Hi, You can use www.watools.es/ to generate a whatsapp account. Thanks
@Максим-в3х8к
@Максим-в3х8к 4 жыл бұрын
I put the 333th like
@foxlearn
@foxlearn 4 жыл бұрын
Thank you !
@whatYouMustKnowInShs
@whatYouMustKnowInShs 9 жыл бұрын
is given me error 5.5.1
@foxlearn
@foxlearn 9 жыл бұрын
+samuel boateng What's your mail server name ? yahoo, google...?
@whatYouMustKnowInShs
@whatYouMustKnowInShs 9 жыл бұрын
google
@foxlearn
@foxlearn 9 жыл бұрын
+samuel boateng Have you enabled google allow send email ?
@whatYouMustKnowInShs
@whatYouMustKnowInShs 9 жыл бұрын
how is it done ? i did allow insecure apps to send messages thought.
@foxlearn
@foxlearn 9 жыл бұрын
+samuel boateng Hi, Please make sure your code is correct, check your port again
How to Send SMTP Email from Computer to Webmail using C#
12:42
Ripon Datta
Рет қаралды 55 М.
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 34 МЛН
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 11 МЛН
Sending Email in C# using FluentEmail
30:36
IAmTimCorey
Рет қаралды 91 М.
[C# Winforms] Email Application (Send & Receive)
8:32
Darren Lee
Рет қаралды 34 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 246 М.
how to send email in asp.net mvc | MVC sending email
12:36
Haritha Computers & Technology
Рет қаралды 35 М.
Winning Facebook (Meta) Hacker Cup Qual Round 2022?
53:55
Neal Wu
Рет қаралды 2,5 МЛН
How to Send Free SMS Using C#?[With Source Code]
17:27
RunCodes
Рет қаралды 34 М.
How Fast Can I Fill My Inbox?
13:30
Dev Detour
Рет қаралды 384 М.