C# Application – How to send an email | FoxLearn


send e-mail via SMTP using C#, sending email in .NET through Gmail, sending email through SMTP. This video shows how to send an email in c#. This is the best way to learn c# for beginners

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#


Xem Thêm Bài Viết Khác:https://wijstaanvooronzegrondrechten.org/cong-nghe


  1. please, I  have an error saying, System.FormatException: 'An invalid character was found in the mail header: '@'.' please, I need the source code.

  2. 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

  3. 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

  4. Hi sir..!!
    I'm trying to send email from Mail address(hassan@creativesolutionzone.com), but its not sending an unhandled : system.net.mail.smtp exception: Mailbox unavailable. the server response was access denied – Invalid HELO name(see RFC2821

    anyone can help me how can i resolve this problem??

  5. 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?

  6. System.FormatException
    Message=Input string was not in a correct format.
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
    at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
    at System.Convert.ToInt32(String value)
    at CyborHub.FeedBack.send_Click(Object sender, EventArgs e) in C:UsersPersonalsourcereposCyborHubCyborHubFeedBack.cs:line 37
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at Bunifu.Framework.UI.BunifuFlatButton.txttext_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Label.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at CyborHub.Program.Main() in C:UsersPersonalsourcereposCyborHubCyborHubProgram.cs:line 19

    Help 🙁

  7. 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.


Please enter your comment!
Please enter your name here