Cov txheej txheem:

Kuv yuav xa email li cas los ntawm ASP net?
Kuv yuav xa email li cas los ntawm ASP net?

Video: Kuv yuav xa email li cas los ntawm ASP net?

Video: Kuv yuav xa email li cas los ntawm ASP net?
Video: Qhia mu kho kom muaj 5 kab ntawv ngo sauv Kênh..Video..Cộng Đồng ..Giới Thiệu 2024, Kaum ib hlis
Anonim

Xa e-mail lus nrog ASP. NET

  1. Tsim cov piv txwv ntawm cov chav kawm SmtpClient thiab MailMessage.
  2. Teem cov khoom rau SmtpClient thiab MailMessage zaus (xws li xa ntawv server, chaw nyob sender, chaw nyob txais, lus subject, thiab lwm yam).
  3. Hu rau Xa () txoj kev ntawm SmtpClient piv txwv rau xa tus lus .

Tsis tas li ntawd, koj SMTP server yog dab tsi?

Feem ntau koj tuaj yeem pom koj qhov chaw nyob SMTP server nyob rau hauv tus account lossis ntu ntu ntawm koj xa ntawv tus neeg siv khoom.) Thaum koj xa email, SMTP server ua koj tus email, txiav txim siab tus neeg rau zaub mov xa lus rau, thiab xa cov lus mus rau tus neeg rau zaub mov ntawd.

Lub npe chaw siv twg tuaj yeem xa email hauv ASP NET MVC? Xa email yog ib txoj hauj lwm ntau heev hauv txhua daim ntawv thov web rau ntau lub hom phiaj. Hauv kev txhim kho txhua hnub peb yuav tsum tau ntxiv qee yam xa ntawv functionality rau peb qhov project rau xa e- xa ntawv rau tus neeg siv khoom lossis lwm tus hauv peb lub vev xaib. Rau xa ntawv los ntawm ASP . NET MVC peb siv lub "System. Net . Xa ntawv " npespace.

Yog li ntawd, qhov chaw nres nkoj twg siv SMTP?

port 25

Pom zoo: