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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:05:05+00:00 2026-05-22T21:05:05+00:00

i am using html page to send a mail, in which i am parsing

  • 0

i am using html page to send a mail, in which i am parsing the tags to give their value at run time.. but my problem is i have two img src tags. i am giving them value at run time, but as the mail is recieved it is showing only one image not both..
i don’t know what might be the problem is. i am using the below code:

  XmlDocument xmlDoc = new XmlDocument();
                 XmlNode node = null;
                 xmlDoc.Load(theme);
                 XmlNodeList list = xmlDoc.SelectNodes("html/body/form/div/img");
                MailMessage mail = new MailMessage();
                string from = ConfigurationManager.AppSettings["from"];
                string password = ConfigurationManager.AppSettings["password"];
                string smtp_port = ConfigurationManager.AppSettings["smtp_port"];

                if(foot_image!= "")
                {
                    Attachment imgAtt = new Attachment(foot_image);
                    imgAtt.ContentId = footimage;
                    imgAtt.ContentDisposition.Inline = true;
                    list.Item(1).Attributes[0].Value = "cid:" + imgAtt.ContentId + "";
                    mail.Attachments.Add(imgAtt);
                }

                if(file != "")
                {
                    Attachment ingatt1 = new Attachment(file);
                    ingatt1.ContentId = headimage;
                    ingatt1.ContentDisposition.Inline = true;
                    list.Item(0).Attributes[0].Value = "cid:" + ingatt1.ContentId + "";
                  //  node = xmlDoc.SelectSingleNode("html/body/form/div/img");
                  //  node.Attributes[0].Value = "cid:" + ingatt1.ContentId + "";
                    mail.Attachments.Add(ingatt1);
                }

                xmlDoc.Save(theme);

                StreamReader sr = new StreamReader(theme);
                string theme_text = sr.ReadToEnd();

                mail.To.Add(to);
                mail.From = new MailAddress(from);
                mail.Subject = "In line image test";
                mail.Body = theme_text;
                mail.IsBodyHtml = true;

please sort out my problem..

my html page is:

<html>
  <head>
    <title>Untitled Page</title>
  </head>
  <body>
    <form>
      <div style="margin-left:50px; padding-top:10px">
        <img src="" style="width:480px; height:150px;" />
      </div>
      <div style="margin-left:50px; padding-top:20px;">
        <h1>
        </h1>
      </div>
      <div style="margin-left:50px; margin-top:200px;">
        <img src='' style="width:480px; height:150px;" />
      </div>
    </form>
  </body>
</html>
  • 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-22T21:05:06+00:00Added an answer on May 22, 2026 at 9:05 pm

    Based on the information I have from our comment thread, there is a problem with the second image being attached to the email correctly. Try sending to a different email address to see if the problem still exists. There could be some spam filtering going on thats blocking that specific image.

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

Sidebar

Related Questions

In HTML, you can send data from one page to another using a GET
i'm trying to validate an html page using jquery, but nothing happens. it's a
We have an HTML page which displays a bunch of pretty bars using divs
I am trying to send an email (using Outlook mail) from a jsp page.
i am using html button in .aspx page. but i want to use the
i am able to send mail using below my code ,but by default after
I want to pass my value of one variable to another html page using
I am using the following html page: <html> <head> <title>AJAX Example</title> <meta http-equiv=Content-Type content=text/html;
How do I get form data from HTML page using c++, as far as
How do I allow youtube videos on my web page using HTML Purifier http://htmlpurifier.org/

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.