View Single Post
  #1 (permalink)  
Old June 14th, 2012, 08:23 AM
Rajasekar1988 Rajasekar1988 is offline
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts

Hi Imar,

I'm currently in the excercise how to send email from ur web page.
The Specifiedpickupdirectory is working fine bt sending from mail to mail not working as it says timeout expired.

As i've already searched the forums and couldn't able to get a solution. Another guy is also having the same problem as i in which he also needs solution. But he's having a different error. so please help me to get a solution.

Here's my code


protected void Page_Load(object sender, EventArgs e)
        MailMessage myMessage = new MailMessage();
        myMessage.Subject = "Text Message";
        myMessage.Body = "Hello World, Welcome To Planet Wrox";
        myMessage.From = new MailAddress("", "Developer");
        myMessage.To.Add(new MailAddress("", "Developer"));

        SmtpClient mySmtpClient = new SmtpClient();


<?xml version="1.0"?>


        <compilation debug="true" targetFramework="4.0" />
      <pages theme ="Monochrome">
          <add tagName="Banner" tagPrefix="Wrox" src ="~/Controls/Banner.ascx"/>
    <!--<smtp deliveryMethod ="SpecifiedPickupDirectory">
      <specifiedPickupDirectory pickupDirectoryLocation ="c:\TempMail" />-->
    <smtp deliveryMethod="Network" from="">
      <network enableSsl ="true" userName="myusername" password="mypassword" host="" port="465"/>
    <!--<smtp deliveryMethod="Network" from="&lt;myemail&gt;">
      <network enableSsl="true" userName="username" password="pwd" host="" port="587"/>

Last edited by Rajasekar1988; June 15th, 2012 at 12:23 AM..
Reply With Quote