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 6914255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:19:26+00:00 2026-05-27T09:19:26+00:00

In my application, I have a requirement where if a user clicks on invoice

  • 0

In my application, I have a requirement where if a user clicks on invoice number the generated invoice statesment is attached to a composed email in outlook. Using code below i am able to send automated emails but i need to just compose and open the outlook window for user to review and edit the contents. Do not send. Kindly help.

public void pdfStatement(string InvoiceNumber)

 {

     InvoiceNumber = InvoiceNumber.Trim();
     string mailServer = "server";
     string fileName = InvoiceNumber;
     string filePath = Server.MapPath("~/Content/reports/");
     string messageBody = "Its an automated test email, please ignore if you receive this.";
     CreateMessageWithAttachment(mailServer, filePath, fileName, messageBody);
 }


  public void CreateMessageWithAttachment(string mailServer, string filePath, string fileName, string messageBody)

      {

     MailMessage message = new MailMessage (
                                            "user@domain.com",
                                            "user@domain.com",
                                            "TestEmail",
                                             messageBody);

      filePath = filePath + fileName + ".pdf";

     // Create  the file attachment for this e-mail message.
     Attachment attach = new Attachment(filePath);
     attach.Name = fileName + ".pdf";
     // Add the file attachment to this e-mail message.
     message.Attachments.Add(attach);
     //Send the message. 
    SmtpClient client = new SmtpClient(mailServer);
     var AuthenticationDetails = new NetworkCredential("user", "password");
     client.Credentials = AuthenticationDetails;
     client.Send(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-27T09:19:26+00:00Added an answer on May 27, 2026 at 9:19 am

    not sure if this will help but how about u just create a form in tha page and allow user to type/see what they be sending.
    Sample here

    Also Preview button can help

    EDIT:
    Then u need to use Microsoft.Office.Interop.Outlook namespace to create a mail item.
    First sample here
    From the sample, the MailItem class(oMsg) also has a Display() Method which should display the created email.
    Second sample (ASP.NET version)

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

Sidebar

Related Questions

In my ASP.Net application I have a requirement that when a user clicks on
I have a requirement in my MVC application to present the user with a
I am using Asp.Net/C# in my application,I have a requirement where I need to
My application has a requirement to open the send email window in outlook. The
I have the following requirement for creating a user profile in my application: User
I have an application requirement where user chooses color & font for title, labels,
I have a business requirement that when the user clicks a series of checkboxes
I currently have a requirement to notify my application user if any fields have
In an application I'm working on, I have the requirement that a user must
In my application I have the requirement to store, for the period the user

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.