Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6957897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:04:15+00:00 2026-05-27T15:04:15+00:00

HI I developed an application to generate a report and the generated report should

  • 0

HI I developed an application to generate a report and the generated report should be emailed to the address given in the config file . Andmy code sends email to outlook only and i as in the live environment there wont be any outlook i want to send it in general .
How can i achive this?

public void DCCEmailSetup(DateTime dateRunReport, string path, string messager)
{
    toEmailSetup = ConfigurationManager.AppSettings["To mailid"];
    fromEmailSetup = ConfigurationManager.AppSettings["From mailid"];

    try
    {
        var message = new MailMessage();
        message.To.Add(toEmailSetup);
        message.Subject = " Report generated " + dateRunReport;
        message.From = new MailAddress(fromEmailSetup);
        try
        {
            message.Attachments.Add(new Attachment(path));
            message.Body = messager;
        }
        catch (Exception e)
        {
            throw ;
        }

        var smtp = new SmtpClient(" ");
        smtp.Send(message);
    }   

    catch (SmtpException ex)
    {
        throw new ApplicationException
          ("SmtpException has occured: " + ex.Message);
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:04:16+00:00Added an answer on May 27, 2026 at 3:04 pm

    If your live environment has no access to the Exchange server it will need access to a relay or something capable of forwarding messages to your Exchange/email server, otherwise no emails can be sent. Sorry 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a simple application in GWT. After that, I generate war file
i have developed an iphone application where i have generated a terms and condition
We developed an application to edit the web.config settings. The user has to locate
I developed a Windows service using C#.NET to generate PDF report. To generate PDF
I'm currently refactoring a console application whose main responsibility is to generate a report
I have developed application for drawing some shapes (lines mostly) , now i need
I developed an application with different MVCs using the Yii Framework For example I
I had developed an application in visual Studio 2005. whenever i run that application
I've developed an application (C#) that currently sits on a a number of workstations.
I've developed an application at working using MySQL 5, that uses Views to access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.