Click here to Skip to main content
15,888,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionpage loaded Pin
Dov Kruman13-Apr-09 16:01
Dov Kruman13-Apr-09 16:01 
QuestionSWF file in .aspx page Pin
Dov Kruman13-Apr-09 14:08
Dov Kruman13-Apr-09 14:08 
AnswerRe: SWF file in .aspx page Pin
Christian Graus13-Apr-09 14:09
protectorChristian Graus13-Apr-09 14:09 
QuestionHow to send email? Pin
Shahdat Hosain13-Apr-09 11:49
Shahdat Hosain13-Apr-09 11:49 
AnswerRe: How to send email? Pin
Colin Angus Mackay13-Apr-09 12:09
Colin Angus Mackay13-Apr-09 12:09 
GeneralRe: How to send email? Pin
Shahdat Hosain13-Apr-09 18:39
Shahdat Hosain13-Apr-09 18:39 
GeneralRe: How to send email? Pin
Abhijit Jana13-Apr-09 21:06
professionalAbhijit Jana13-Apr-09 21:06 
GeneralRe: How to send email? [modified] Pin
Shahdat Hosain14-Apr-09 5:02
Shahdat Hosain14-Apr-09 5:02 
According to Ur suggestion I applied following code. Output show Msg sent successfully. Actually never it is sent to destination. Messages are only push to C:\inetpub\mailroot\queue;
1.I think IIS can not push the emails out on the internet.How can I look on SMTP response code.
2.I want to send emails from localhost. Now I confused how it possible sending a mail from anonymous mail address like "shahdat_mbstu@yahoo.com" through localhost, bcoz there no relation between my localhost and my mail address "shahdat_mbstu@yahoo.com". ;
3. Please help me!;



public void CreateCopyMessage(string server)
{
MailAddress from = new MailAddress("shahdat_mbstu@yahoo.com", "Ben Miller");
MailAddress to = new MailAddress("shahdat45ict@yahoo.com", "Shahdat Kooras");//jane@contoso.com
MailMessage message = new MailMessage(from, to);
// message.Subject = "Using the SmtpClient class.";
message.Subject = "Using the SmtpClient class.";
message.Body = @"Using this feature, you can send an e-mail message from an application very easily.";
// Add a carbon copy recipient.
MailAddress copy = new MailAddress("Notification_List@contoso.com");
message.CC.Add(copy);
SmtpClient client = new SmtpClient(server);
// Include credentials if the server requires them.
client.Credentials=
client.Credentials = CredentialCache.DefaultNetworkCredentials;
Console.WriteLine("Sending an e-mail message to {0} by using the SMTP host {1}.",
to.Address, client.Host);

try
{
client.Send(message);
lblMessage.Text = "Message successfully sent";
}
catch (Exception ex)
{
Console.WriteLine("Exception caught in CreateCopyMessage(): {0}",
ex.ToString());
}
}

shahdat

modified on Tuesday, April 14, 2009 11:09 AM

GeneralRe: How to send email? Pin
kishorgh13-Apr-09 21:12
kishorgh13-Apr-09 21:12 
Questionsubmit form inside an automatically created ASP form Pin
shabya13-Apr-09 11:29
shabya13-Apr-09 11:29 
AnswerRe: submit form inside an automatically created ASP form Pin
Christian Graus13-Apr-09 13:14
protectorChristian Graus13-Apr-09 13:14 
GeneralRe: submit form inside an automatically created ASP form Pin
shabya13-Apr-09 19:32
shabya13-Apr-09 19:32 
Question[Asp .Net Page output caching] invalidate subset of pages on demand only Pin
lermi13-Apr-09 11:27
lermi13-Apr-09 11:27 
QuestionOrder Page... I'm almost there Pin
Dirso13-Apr-09 8:07
Dirso13-Apr-09 8:07 
AnswerRe: Order Page... I'm almost there Pin
Yusuf13-Apr-09 8:42
Yusuf13-Apr-09 8:42 
GeneralRe: Order Page... I'm almost there Pin
Dirso13-Apr-09 8:46
Dirso13-Apr-09 8:46 
GeneralRe: Order Page... I'm almost there Pin
Yusuf13-Apr-09 13:55
Yusuf13-Apr-09 13:55 
GeneralRe: Order Page... I'm almost there Pin
Dirso14-Apr-09 2:13
Dirso14-Apr-09 2:13 
GeneralRe: Order Page... I'm almost there Pin
Yusuf14-Apr-09 9:14
Yusuf14-Apr-09 9:14 
QuestionWebServices/WSDL Pin
Mike Doner13-Apr-09 4:10
Mike Doner13-Apr-09 4:10 
AnswerRe: WebServices/WSDL Pin
Abhijit Jana13-Apr-09 4:53
professionalAbhijit Jana13-Apr-09 4:53 
GeneralRe: WebServices/WSDL Pin
Mike Doner13-Apr-09 4:58
Mike Doner13-Apr-09 4:58 
GeneralRe: WebServices/WSDL Pin
Abhijit Jana13-Apr-09 5:04
professionalAbhijit Jana13-Apr-09 5:04 
GeneralRe: WebServices/WSDL Pin
Mike Doner13-Apr-09 5:24
Mike Doner13-Apr-09 5:24 
GeneralRe: WebServices/WSDL Pin
Mike Doner13-Apr-09 6:56
Mike Doner13-Apr-09 6:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.