473,382 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

System.Web.Mail, Exchange Server, SMTP Virtual Server

I am trying to send email through our Exchange server but
the emails are sitting the queue folder. In the Default
SMTP Virtual Server properties of IIS I *think* I have to
point to our Exchange server somewhere.

Where do I put our Exchange server name?

Here is my code if it's of any value:
using System;
using System.Web.Mail;

public class MailHelper
{
public static void SendMail(string to, string
from, string subject, string body)
{
try
{
SmtpMail.SmtpServer = "localhost";
MailMessage mail = new MailMessage
();
mail.To = to;
mail.From = from;
mail.Subject = subject;
mail.Body = body;
SmtpMail.Send(mail);
}
catch(Exception ex)
{
//exception code
}
}
}

Thanks,
Darin
Nov 15 '05 #1
0 3242

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: StinkFinger | last post by:
My IIS / PHP / MySQL and Exchange are on the same box. To allow PHP to send mail I need to add my servers IP to the "Granted" list for the SMTP Virtual Server in Exchange, however, this opens me up...
1
by: JSzucs | last post by:
I wrote a little code snipet in Asp.Net to send a default message to my outlook email address. That works fine, since the SMTP virtual server default domain is same domain as my outlook mail...
2
by: \Crash\ Dummy | last post by:
I would like to use a form on my web site to e-mail user comments to me. I have ASP capability to run server side scripts. The host domain has a SMTP server, but I don't know if it is on the same...
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
5
by: Bryan Martin | last post by:
I have a program which has ran every night fine until last night. Now it bombs with the following errors. I have also broke this down to its simplest form for sending the mail...
8
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great ...
4
by: | last post by:
Hi all, We are using the Asp.Net SMTP Client to send email via our Exchange 2003 SP2 Server. When trying to send email to a local recipient I am getting the following error:- Server:...
11
by: justsome_newbie | last post by:
Hello experts! I'm trying to send mail from my C# Asp.Net webpage. I used the code samples at www.systemnetmail.com but it still won't send. I think the problem is on the iis or exchange server...
9
by: Homer | last post by:
Hi, I've posted this question before but didn't get anywhere with it. Please help me out if you know of a solution for it. I got "InnerException: Unable to connect to remote server"..."No...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.