Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Smtp send fails
Message
De
26/01/2013 16:01:45
 
 
À
26/01/2013 14:55:19
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01564254
Message ID:
01564269
Vues:
36
>>>Hi,
>>>
>>>I have some C# code which works fine on my system sending emails, but at th eclient site there is a delay of about 45 seconds when the command runs and then it errors out:
>>>
>>>Failure sending mail.
>>>Source: System
>>>Target Site: Void Send(System.Net.Mail.MailMessage)
>>>Stack Trace: at System.Net.Mail.SmtpClient.Send(MailMessage message)
>>>
>>>The line it is failing on is:
>>>
>>>client.Send(msg);
>>>
>>>I'm using the same credentials and accounts on my pc.
>>>
>>>Any ideas what could cause this and/or alternative methods?
>>
>>Are you sure it's not simply an internet access problem ?
>>
>
>I initially thought maybe the firewall was blocking it, but switched it off and still the same problem. I am actuallt remotely connecting to the PC over the internet so I know the internet access is working.
>
>>>I have had a suggestion of using a local smtp server, can anyone recommend a free one that is easy to setup and reliable?
>>
>>That would have been mine :-}
>>
>>Depending on what OS's this has to run on :
>>IIRC Smtp servers are included (or can be installed) on Pro versions of Windows 7 and XP as well as Windows server versions.
>
>Yes, your suggestion :)
>
>One PC is XP (this one I'm on), hopefully it's Pro, not sure what the others are, but I'd guess 7 or maybe Vista. I'll have a look around and see.
>
>Or the PCs all have access to a Server, maybe there's one on that, Or maybe I'll look for an Outlook solution as that's what they use for all their emails. :)

As an anti-spam measure, most ISPs require that outgoing SMTP mail uses their SMTP server. So, if you and your client have different ISPs, you won't be able to use your SMTP server information while trying to send a mail from your client's site. You will have to use their SMTP server info.

For example, your ISP's SMTP server may be smtp.myisp.com. Your client's might be mail.clientsisp.net. Any mails sent from machines physically located at your client (even if you're accessing it remotely) will need to specify mail.clientsisp.net as the SMTP server.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform