Jump to content

Embed a letter into an e-mail


jpcozzijr
 Share

Recommended Posts

Not sure if this is the correct forum for this question, but here it is.

Is there a way to load an announcement into an e-mail so that when the e-mail is opened, the announcement is in the e-mail and not as an attachment.

Thanks,

John Jr.

Can you not simply copy and paste the text of the announcement into the body of the Email - or have I misunderstood your problem?

Link to comment
Share on other sites

Not sure if this is the correct forum for this question, but here it is.

Is there a way to load an announcement into an e-mail so that when the e-mail is opened, the announcement is in the e-mail and not as an attachment.

Thanks,

John Jr.

Can you not simply copy and paste the text of the announcement into the body of the Email - or have I misunderstood your problem?

Exactly what I thought when I read the question.

Link to comment
Share on other sites

Not sure if this is the correct forum for this question, but here it is.

Is there a way to load an announcement into an e-mail so that when the e-mail is opened, the announcement is in the e-mail and not as an attachment.

Thanks,

John Jr.

Can you not simply copy and paste the text of the announcement into the body of the Email - or have I misunderstood your problem?

Exactly what I thought when I read the question.

It depends on the answer to this question "what email client do you have?" and what he is trying to load into the E-Mail

Link to comment
Share on other sites

Not sure if this is the correct forum for this question, but here it is.

Is there a way to load an announcement into an e-mail so that when the e-mail is opened, the announcement is in the e-mail and not as an attachment.

Thanks,

John Jr.

Can you not simply copy and paste the text of the announcement into the body of the Email - or have I misunderstood your problem?

I use windows live. When we try to copy and paste the announcement into the e-mail, all that shows up are blank blocks where our pictures and words should appear.

Thanks,

John Jr.

Link to comment
Share on other sites

I have just sent myself an e mail in Windows Live Mail. This is what I get back. No problems as far as I can see.

*******************************************************************************************************************************

The following is copied and pasted in. This is an announcement.

Link to comment
Share on other sites

I have just sent myself an e mail in Windows Live Mail. This is what I get back. No problems as far as I can see.

*******************************************************************************************************************************

The following is copied and pasted in. This is an announcement.

I don't see anything - your attachment or insert is not working

Link to comment
Share on other sites

yes true but as there is a problem I took it the announcement might be in the form of a card made of pictures and fancy writing, could well be wrong though

You are correct. It is an announcement in a word document that has pictures and words. It is an invitation for an Eagle Court that has a couple pictures of the project with the invitation to attend.

Thanks,

John Jr.

Link to comment
Share on other sites

I have just tried and can't do it either so I think you need to turn it into a JPEG or GIF to do what you want, I tried saving in three different formats and it wouldn't work, not an expert with word but you may have better luck if you can open it in powerpoint as You can then save it as a JPEG or GIF and then it will work, at least it does in my office 97

Link to comment
Share on other sites

I have just tried and can't do it either so I think you need to turn it into a JPEG or GIF to do what you want, I tried saving in three different formats and it wouldn't work, not an expert with word but you may have better luck if you can open it in powerpoint as You can then save it as a JPEG or GIF and then it will work, at least it does in my office 97

We will try that,

Thanks,

John Jr.

Link to comment
Share on other sites

It is an announcement in a word document that has pictures and words.

As I wrote earlier, start the email message in HTML format, then copy and paste the Word document into it.

If the format is not exactly the same as in the original Word doc, then save the Word doc in HTML format and try again.

Link to comment
Share on other sites

I'm pretty sure that you are going to have a few problems "Embedding" an image in a web based email even if it is contained within a "Word" document. :(

You would need an email client such as "Thunderbird",AOL,Outlook Express,Incredimail, etc; etc.

I can embed (Just simple copy and paste) an image straight into a AOL email message, and the recipient receives the photo in the message.

Using my web based "Mail.com" this is not possible. You could do a search for something like "Embedding images in web based email."

I did that some time ago, and came back with a load of ideas with which to be able to do it. If anyone wants to give it a shot please feel free. - I haven't got a lot of interest, - I just use AOL. B)

Here are the 3 workarounds that I came up with in my search:

.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.

"Just a small and buggy function that I wrote. It'll embed images just like Outlook does, using a cid (Anonymous)

"

public static MailMessage AttachImages(MailMessage message) {if (!message.IsBodyHtml)
throw new ApplicationException("Message formart needs to be HTML");

Regex reg = new Regex("src[^>]*[^/].(?:jpg|bmp|gif)(?:\"|\')");

MailMessage messageOut = message;

foreach (Match match in reg.Matches(message.Body))
{
string cid = Guid.NewGuid().ToString("N");
Stream srcStream;

string src = match.Value;
src = src.Replace("src=", "");
src = src.Replace("\"", "");

if (src.StartsWith("http://"))
{
WebRequest request = HttpWebRequest.Create(src);
srcStream = request.GetResponse().GetResponseStream();
}
else
{
srcStream = new MemoryStream(File.ReadAllBytes(src));
}

Attachment newAttachment = new Attachment(srcStream, "image/" +

Path.GetExtension(src).ToLower().Replace(".", ""));
newAttachment.ContentId = cid;
messageOut.Attachments.Add(newAttachment);

messageOut.Body = messageOut.Body.Replace(src, "cid:" + cid);
}

return messageOut;
}

.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.

(Anonymous) - Similar to what Pat is suggesting.

1. Add your images as attachments to the e-mail message (MailMessage.Attachments).

2. Set the ContentId property to some unique value for each attached image you want to reference

in the e-mail body.

3. Refer to the attached images in the body (HTML) using the unique ContentId in the following

format: <img src="cid:ContentID"/>

4. Send the message and it should work

.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.

"I have found the best way of doing this is to avoid using the .net framework, and use COM

cdosys.dll" (Anonymous)

string email = "[email protected]";

CDO.Message mm = new CDO.MessageClass();

mm.To = email;
mm.From = "[email protected]";
mm.Subject = "Test Email";

mm.HTMLBody = "Picture 1: <img src='image001.jpg';

mm.AddRelatedBodyPart(@"C:\share\image001.jpg","image001.jpg",

CDO.CdoReferenceType.cdoRefTypeLocation, null, null);

CDO.Configuration objConfig = new CDO.ConfigurationClass();

objConfig.Fields["cdoSendUsingMethod"].Value = CDO.CdoSendUsing.cdoSendUsingPort;

objConfig.Fields["cdoSMTPServer"].Value = "MYSMTPSERVER" ;

objConfig.Fields["cdoSMTPServerPort"].Value = 25 ;

objConfig.Fields["cdoSMTPAuthenticate"].Value = CDO.CdoProtocolsAuthentication.cdoBasic;

objConfig.Fields.Update();

mm.Configuration = objConfig;

mm.Send();

.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.

If anyone gets any of that to work let me (and John Jr.) know.

John. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy