Hi friends,
Is any other method to send mail through web Applications with out using SMTPMail server? pls.. share your ideas.
Thanks in Advance,
KarthikaPalaniswamy.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
jingeRank #2,527 · 554 reputationPosted Oct 24, 2009, 1:27 AM EDT
http://weblogs.asp.net/scottgu/archive/2005/12/16/432854.aspx
Amit ChoudharyRank #145 · 15.8K reputationPosted Oct 24, 2009, 2:16 AM EDT
How to configure Agent to use Database Mail is here: http://msdn.microsoft.com/en-us/library/ms186358.aspx
The .NET class for Agent ( Microsoft.SqlServer.Management.Smo.Agent) is here: http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.agent.aspx
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 24, 2009, 2:40 AM EDT
It was possible in vb 6 Time to Send mail With Outlook Object Library ..
Add a reference to the Microsoft Outlook 2002 Object Library or to the Microsoft Office Outlook 2003 Object Library
Here is C# Code For That Take a Look
using System; //TO DO: If you use the Microsoft Outlook 11.0 Object Library, uncomment the following line. //using Outlook = Microsoft.Office.Interop.Outlook; namespace Outlook_SendMailItem { public class Class1 { public static int Main(string[]args) { try { // Create the Outlook application by using inline initialization. Outlook.Application oApp = new Outlook.Application(); //Create the new message by using the simplest approach. Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem); //Add a recipient. // TODO: Change the following recipient where appropriate. Outlook.Recipient oRecip = (Outlook.Recipient)oMsg.Recipients.Add("e-mail address"); oRecip.Resolve(); //Set the basic properties. oMsg.Subject = "This is the subject of the test message"; oMsg.Body = "This is the text in the message."; //Add an attachment. // TODO: change file path where appropriate String sSource = "C:\\setupxlg.txt"; String sDisplayName = "MyFirstAttachment"; int iPosition = (int)oMsg.Body.Length + 1; int iAttachType = (int)Outlook.OlAttachmentType.olByValue; Outlook.Attachment oAttach = oMsg.Attachments.Add(sSource,iAttachType,iPosition,sDisplayName); // If you want to, display the message. // oMsg.Display(true); //modal //Send the message. oMsg.Save(); oMsg.Send(); //Explicitly release objects. oRecip = null; oAttach = null; oMsg = null; oApp = null; } // Simple error handler. catch (Exception e) { Console.WriteLine("{0} Exception caught: ", e); } //Default return value. return 0; } } }if it helps you please check "Do you like this answer" :)
jingeRank #2,527 · 554 reputationPosted Oct 24, 2009, 2:43 AM EDT