I cannot get SMTP Virtual Server in IIS6 in Windows Server 2003 to send an
email. I have used the following code in an ISAPI dll. This code works in
Windows 2000 server. connection.Connected() returns true so I think it is
connection.SendMessage(msg) that fails.
CSMTPConnection connection
connection.Connect("DEV_SSP2",30000);
CMimeMessage msg;
if(connection.Connected())
{
msg.SetSender("sender@odpm.gsi.uk");
msg.AddRecipient("dale@home");
msg.SetSubject("ODPM Communication");
msg.AddText("The file you requested is attached.");
msg.AttachFile(LocalFileName1,"Your file","application/vnd.ms-excel")
if(connection.SendMessage(msg))
connection.Disconnect();
}