Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Sendmail text file

    Hi all!

    I'm new to Perl and trying to adapt a short "tell-a-friend" script. I simply want the text email that the script sendmails to call a picture file. Can this be done?

    The best I've achieved is getting the <img src="http//... link text shown in the resulting email. The bold is my attempt...

    sub mailinfo
    {
    open(MAIL, "|$mailprogram -t") || die "No response from server !\n\n";
    print MAIL "From: $from_email\n";
    print MAIL "To: $to_email\n";
    print MAIL "Subject: $subject\n\n";

    print MAIL @mailtext;
    print "<img src="http://kover-it.com/ecard/b2.gif">\n";
    close(MAIL);
    }


    Any help much appreciated

    Thanks in advance...

  • #2
    New Coder
    Join Date
    Aug 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you need to check out the mime thing on a good search engine.... since you're trying to actually have a gif file to display in someone's mail client.

    You're only missing one thing I think.

    having to do with multi-part etc...

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Pager

    Not trying to include an attachment. Is that what you meant?

    Trying to simply call a picture file from remote server.

    Thanks

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    hey man,
    your prob is not bad.. just replace
    print "<img src="http://kover-it.com/ecard/b2.gif">\n";
    with this and it`ll be fine..
    print "<img src=\"http://kover-it.com/ecard/b2.gif\">\n";
    cya
    sir p

  • #5
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can write an html file and send that as an attachment. That will show the the html file in the email and not just a plain text email.
    WolfPower Script And Programs
    WolfPower


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •