in reply to Outlook email with table

I think you're confused. Outlook is an email client which sends emails via a mail server. Cut out the middle man and use MIME::Lite to send the email via the same mail server, formatted however you require.

Replies are listed 'Best First'.
Re^2: Outlook email with table
by NewMonk2Perl (Sexton) on Jan 24, 2011 at 15:28 UTC

    So I will be able to copy a table from excel? I will take a look at it.

    Thanks again..

    Paul

      You mentioned you wanted it to "look nice(same as if I manually copied it from excel and pasted it into an outlook email)", at this point I wasn't sure if Excel was the source or if the 'table' came from somewhere else, for example an HTML table. It helps to be specific when asking a question.

      Regarding reading from Excel see Spreadsheet::ParseExcel, it's similar to Spreadsheet::WriteExcel which I introduced you to previously.

        Yes, Excel would be the source. Thanks for the help! I was able to get that other issues with the other nodes resolved thanks to you. I tried running a test with MIME:Lite. It required me to install all these other packages. Once they were installed I ran into authentication issues. I also installed Authen-SASL but it errored out(no SASL mechanism found at SASL.pm line 77 and SMTP.pm line 143. All I am looking for is a way to be able to copy a row from excel and paste it into an email to send.

        Thanks again,

        Paul

      MIME::Lite is a fairly low level module for creating e-mails that are MIME encoded. That means that, in addition to attachments, you can have the e-mail body be something other than plain text. If you want to send e-mails that are formatted, you're going to want to create an HTML e-mail. This is where you're going to have to do more than simply copy and paste in a MS Office appliction - you're going to need to do the equivalent of pasting your table into something (possibly Word) and save that as HTML. You'll then need to take the HTML table code and put it into the body of your e-mail. You're then going to have to write Perl code that sets the HTML for your e-mail body, for your table, and for any other information that you want in the e-mail. One very good HTML authoring site is SitePoint.com. They have an excellent guide on how to create good e-mail newsletters. Although you're not specifically creating a newsletter, the information still applies, because you're creating an HTML e-mail.

      PS: Even though I mention Word as a possible HTML creator, I only say that because it sounds like you have not written Perl code to generate e-mails before. Word's HTML formatting is complex, verbose, and from an HTML standards perspective quite bad.

        Great information and I think this could be very useful in the future. It sounds like alot of work and steps for what I need to do. Isn't there an easier way to just copy from excel and paste it into an outlook email? Thanks for everyones help. Newbie here still trying to learn.

        Paul