Greetings, All --

I created a script that reads information from a database, applies that information to address the e-mail and insert the user's name and password into the text of the message (doing an on-line survey for a client).

The code is very basic and has worked well on two different projects. The problem I have concerns the message text. The URL is hardcoded in the message text. The message text is assigned to a variable. The URL was encoded as

HTTP://www.somesite.com/somepage

but appears in a handful of messages as

HTTP://wwwsomesite.com/somepage

There are no special characters being read from the database.

I have not been able to find any pattern to the occurence.

Have any of you encountered this behavior? Any help understanding this would be appreciated.

Thanks!

=== U P D A T E ===

As requested...

use DBI(); use Mail::Sendmail; unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , '100.100.100.200'; $dbaxs = DBI->connect("DBI:ODBC:dsn=CLIENT_EMAIL") || die "Connection +died\n\n"; $Exe = "SELECT * FROM qryFeedLetter"; $qry = $dbaxs->prepare("$Exe"); $qry->execute() || die "\nBad SQL\n"; while (my $rw = $qry->fetchrow_hashref()) { $login = $rw->{'UsrLogin'}; $FName = $rw->{'UsrFName'}; $Supervisor = $rw->{'Supervisor'}; $EmlTo = $rw->{'UsrEmail'}; $subj = "Employee Satisfaction Survey"; $msg = "Dear $FName:\n\nYou are probably aware .. "; $msg .= ".. more text .. \nNOTE: In your survey, the word \"manage +r\" refers to $Supervisor. .. blah blah blah .. go to http://www.som +esite.com/somepage Your personal \"Log-In\" code is \"$login\". .. +more text here, then .. Thanks.\n\nVery sincerely,\n\nClient"; %mail = ( To => "$EmlTo", From => 'ClientSurvey <soembody@somesite.com>', Bcc => 'me@somesite.com', Subject => "$subj", Message => "$msg" ); sendmail(%mail) || die $Mail::Sendmail::error; print "\n\nLogged:\n", $Mail::Sendmail::log; } $dbaxs->disconnect();

Win XP, Perl v5.8

The text assigned to $msg is significantly longer than posted here

Thanks again


In reply to MAIL::Sendmail Problem - Updated by bilfurd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.