Activate SMTP Mail Server for sending mails via VB.Net

Activate SMTP Mail Server for sending mails via VB.Net

Post by Sing » Thu, 10 Aug 2006 18:58:21



I have developed a program to send e-mails via VB.Net. But I am not
able to configure SMTP Server. Therefore, not able to send the mails
through the program. Also, please make me understand, how to read
incoming mails in the software.
 
 
 

Activate SMTP Mail Server for sending mails via VB.Net

Post by Raj » Fri, 11 Aug 2006 06:04:22


What problem are you facing to configure smtp server ?

Raj

 
 
 

Activate SMTP Mail Server for sending mails via VB.Net

Post by Sing » Sat, 02 Sep 2006 12:45:04


The code is as follows:

________________________________________
Imports System.Web.Mail

Dim msgmail As New MailMessage
        With msgmail


            .Subject = "From VB app"
        End With
        SmtpMail.SmtpServer = "localhost"
        SmtpMail.Send(msgmail)
        MsgBox("sent")
__________________________________________

However, when I check my mailbox, there is no mail, Please solve this
issue.

 
 
 

1. Sending mails in ASP.NET C# 2008 using Virtual SMTP Server (local)

When i try to send mail from my c# webform using my local smtp server
i get this message...

"System.Net.WebException: Unable to connect to the remote server --->
System.Net.Sockets.SocketException: No connection could be made
because the target machine actively refused it 196.3.3.4:25 at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) at
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout,
Exception& exception) --- End of inner exception stack trace --- at
System.Net.ServicePoint.GetConnection(PooledStream PooledStream,
Object owner, Boolean async, IPAddress& address, Socket& abortSocket,
Socket& abortSocket6, Int32 timeout) at
System.Net.PooledStream.Activate(Object owningObject, Boolean async,
Int32 timeout, GeneralAsyncDelegate asyncCallback) at
System.Net.PooledStream.Activate(Object owningObject,
GeneralAsyncDelegate asyncCallback) at
System.Net.ConnectionPool.GetConnection(Object owningObject,
GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32
port) at System.Net.Mail.SmtpClient.GetConnection() at
System.Net.Mail.SmtpClient.Send(MailMessage message) "

here is the code i am using:

try
        {
            SmtpClient client = new SmtpClient();
            client.Host = "196.3.3.4";
            client.Port = 25;


        }
        catch (SmtpException ex)
        {
            lblMessage.Text = ex.InnerException.ToString();
        }

is there any special thing to do at my IIS server / Virtual SMTP
Server?

Thanks in Advance!

2. Which Brand of CDR Discs should be Used?

3. Sending mail through NON-Anonymous SMTP server

4. remove a certain text from every sentence

5. Failed to send mail to SMTP server that shipped with Linux

6. Status of UML-F?

7. Unable To send Mail using System.Web.Mail Namespace

8. Problems with restore of a backup/image

9. Problems sending SMTP Mails

10. SMTP can't send mail

11. sending mail using google SMTP

12. Sending Mails through SMTP protocol in ASP.Net 2.0 application

13. How to send reply mail for Incoming mail