For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > April 2007 > email text









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author email text
Mathew

2007-04-28, 6:58 pm

I have a script which creates a text file for each of several users.
However, the contents of the file are rarely enough to warrant it. I'd
much rather place the information inside the email instead of attaching
it as a file. I haven't been able to find anything to explain how to do
this though. Although, something tells me I'm completely over-thinking it.

Can someone help?

Mathew
Nigel Peck

2007-04-28, 6:58 pm

Mathew wrote:
> I have a script which creates a text file for each of several users.
> However, the contents of the file are rarely enough to warrant it. I'd
> much rather place the information inside the email instead of attaching
> it as a file. I haven't been able to find anything to explain how to do
> this though. Although, something tells me I'm completely over-thinking it.
>
> Can someone help?
>
> Mathew


Could you explain a bit more about this? What email? If you're attaching
it then that must mean you're creating the email so what's stopping you
putting the text in the body of the message? How are you creating the email?

Cheers,
Nigel

Jm

2007-04-28, 6:58 pm

look at Mail::Sender


On 4/28/07, Mathew <theillien@yahoo.com> wrote:
>
> I have a script which creates a text file for each of several users.
> However, the contents of the file are rarely enough to warrant it. I'd
> much rather place the information inside the email instead of attaching
> it as a file. I haven't been able to find anything to explain how to do
> this though. Although, something tells me I'm completely over-thinking
> it.
>
> Can someone help?
>
> Mathew
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>



--
since this is a gmail account, please verify the mailing list is included in
the reply to addresses

Mathew

2007-04-28, 6:58 pm

I'm using MIME::Lite to create the email. It is being generated as I'm
able to send out all the emails necessary.

The way I'm doing it now is to use a variable which holds a small
message to be inserted into the email. However, I don't know how to
dynamically format that variable with the data I'm sending.

The data looks like this:

Ticket ID hh:mm
---------------------
000000 00:00
111111 11:11
222222 22:22

And so on. That is what gets placed in the file but I'd prefer it be
placed inside the email.

Mathew

Nigel Peck wrote:
> Mathew wrote:
>
> Could you explain a bit more about this? What email? If you're attaching
> it then that must mean you're creating the email so what's stopping you
> putting the text in the body of the message? How are you creating the
> email?
>
> Cheers,
> Nigel
>
>
>

Robert Hicks

2007-04-28, 6:58 pm

I typically use a HEREDOC to format my email messages. You can do all
sort of things by sending the email as HTML of you want as well.

Robert

Mathew wrote:
> I'm using MIME::Lite to create the email. It is being generated as I'm
> able to send out all the emails necessary.
>
> The way I'm doing it now is to use a variable which holds a small
> message to be inserted into the email. However, I don't know how to
> dynamically format that variable with the data I'm sending.
>
> The data looks like this:
>
> Ticket ID hh:mm
> ---------------------
> 000000 00:00
> 111111 11:11
> 222222 22:22
>
> And so on. That is what gets placed in the file but I'd prefer it be
> placed inside the email.
>
> Mathew

Mathew

2007-04-28, 6:58 pm

I'll have to look at the HEREDOC option. I'm not familiar with that.
As for HTML, people here get quite frisky when they don't get plain text
emails.

Mathew

Robert Hicks wrote:
> I typically use a HEREDOC to format my email messages. You can do all
> sort of things by sending the email as HTML of you want as well.
>
> Robert
>
> Mathew wrote:
>

Robert Hicks

2007-04-28, 9:59 pm

my $BODY = <<"END_TXT";
This is the message that will be passed and you
can even put $variables into it and they will
be interpolated.
END_TXT

Then you just pass $BODY to however you constructed your MIME::Lite call.

HTH,

Robert

Mathew wrote:[color=darkred]
> I'll have to look at the HEREDOC option. I'm not familiar with that.
> As for HTML, people here get quite frisky when they don't get plain text
> emails.
>
> Mathew
>
> Robert Hicks wrote:
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com