C# tips and tricks 14 - How to send an email to multiple users with attachments and HTML body

  Рет қаралды 6,277

Ankpro Training

Ankpro Training

Күн бұрын

Пікірлер: 14
@mallis003
@mallis003 6 жыл бұрын
Nice video.
@ibrahimalsajer2375
@ibrahimalsajer2375 5 жыл бұрын
tried this with VS 2017 , it works fine but it can not send the attachment it throws an Exception Error every time it is trying to attach the file ..
@AnkproTraining
@AnkproTraining 4 жыл бұрын
We have used outlook.com email, are you trying with same or gmail?
@vijaysahuhrd
@vijaysahuhrd 6 жыл бұрын
Tried but getting this : A connection attempt failed because the connected party did not properly respond after a period of time
@AnkproTraining
@AnkproTraining 6 жыл бұрын
Are you using office network or office laptop? They might have blocked the port.
@vijaysahuhrd
@vijaysahuhrd 6 жыл бұрын
Thanks for your quick response : Actually I am using my personal laptop with my home wifi connection
@AnkproTraining
@AnkproTraining 6 жыл бұрын
Are you using gmail or outlook.com? verify the port number and smtp url one more time. If everything ok paste your code except password. We will check from here
@vijaysahuhrd
@vijaysahuhrd 6 жыл бұрын
Using port 587 and smtp.gmail.com for gmail account... I have also tried with 25 port
@AnkproTraining
@AnkproTraining 6 жыл бұрын
var client = new SmtpClient("smtp.gmail.com", 587) { Credentials = new NetworkCredential("myusername@gmail.com", "mypwd"), EnableSsl = true }; client.Send("myusername@gmail.com", "myusername@gmail.com", "test", "testbody"); Console.WriteLine("Sent"); Console.ReadLine(); You may also need to enable access for "less secure apps" in your gmail settings page: google.com/settings/security/lesssecureapps. This is necessary if you are getting the exception "`The server response was: 5.5.1 Authentication Required. If you don't get the success, paste your code here and remove the password in code.
C# tips and tricks 15 - How to add text watermark to an image using C#
16:20
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 650 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
sending email with image embed inside in the body with c# asp.net gmail
14:09
Haritha Computers & Technology
Рет қаралды 13 М.
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 46 М.
Turn 2 Eggs Into Fluffy Japanese Soufflé Pancakes!
5:26
CookingAtHome
Рет қаралды 3,2 МЛН
Sending emails to multiple recipients using asp.net
11:26
Haritha Computers & Technology
Рет қаралды 2,7 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 327 М.
C# Send Email with Attachment using Windows Application
8:40
Code Factory 2016
Рет қаралды 2,5 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН