Hello marco pessina,
Then Newsletter module uses SmtpClient in its basis. The module stores the SMTP settings you have entered in the SMTP form in the database. The module call the server you have entered by IP(name) and tries to send a letter. The error you have posted says that the request to an IP fails. As you can see from the stack the first error is thrown from
System.Net.Sockets - used of the Windows Sockets (Winsock) interface to control access to the network.
The TcpClient, TcpListener, and UdpClient classes encapsulate the details of creating TCP and UDP connections to the Internet.
The problem you have could be result of
DNS Routing
Some proxy settings
The port is not being open on the server.
Firewall settings or antivirus solutions blocking traffic.
Internal policy or permissions - permit WebRequest calls going out from the machine.
The console application below shows the classes that we use to send a newsletter. You can run it directly over your server. You have to add the required references and generate the executable.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Newsletters;
using System.Net.Mail;
using Telerik.Notifications.Newsletters;
using System.Text.RegularExpressions;
using Telerik.Notifications.Services;
using System.Net;
namespace TestEmailSettings
{
class Program
{
static void Main(string[] args)
{
string from = "TYPE FROM EMAIL ADDRESS HERE";
string to = "TYPE TO EMAIL ADDRESS HERE";
string subject = "test";
string body = "test SMTP";
string smtpHost = "TYPE THE HOST IP HERE";
int smtpPort = 25;
string smtpUsername = "TYPE THE USERNAME HERE";
string smtpPassword = "TYPE THE PASSWORD HERE";
bool smtpSsL = false;
MailMessage message = new MailMessage(from, to);
message.Body = body;
SmtpClient emailClient = new SmtpClient(smtpHost, smtpPort);
emailClient.Credentials = new System.Net.NetworkCredential(smtpUsername, smtpPassword);
// THIS GETS THE NETWORK CREDETIALS
//emailClient.Credentials = CredentialCache.DefaultNetworkCredentials;
//MailMessage m = new MailMessage(from, to, subject, body );
emailClient.Send(message);
}
}
}
Kind regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items.