سلام بر برنامه نویسان عزیز 😉 در این مطلب کد ارسال ایمیل + to و cc و bcc و موضوع و محتوا و attachment به وسیله SmtpClient در سی شارپ #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
کد ارسال ایمیل + to و cc و bcc و موضوع و محتوا و attachment به وسیله SmtpClient در سی شارپ #C :
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Mail;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
public class MainClass
{
public static void Main()
{
SmtpClient client = new SmtpClient("smtp.localhost.com");
client.Credentials =new NetworkCredential("username", "password");
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Mail;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
public class MainClass
{
public static void Main()
{
SmtpClient client = new SmtpClient("smtp.localhost.com");
client.Credentials =new NetworkCredential("username", "password");