Click here to Skip to main content
14,387,402 members
Rate this:
Please Sign up or sign in to vote.
i am tried to send an email using smtp in .net mvc with pdf attachment (in memory attachment), its working on local host but when we deplyed on IIS server geting the following exception. exception 'failure sending mail'

What I have tried:
Updated 6-Apr-17 22:15pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1


First the SMTP server should be accessible from the hosted server.

Type below command after opening CMD in administrator mode from hosted server

Telnet [SMTP Server IP / Name] [Port]

if its not accessible then as your infra guy to do the needful.
Member 10484162 7-Apr-17 5:39am
thanks for your response, i try the following command and its sending a response but still i am not able to sent an email with attachment. Thanks
Suvabrata Roy 7-Apr-17 6:21am
So you have connectivity with the SMTP server ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100