473,587 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with Net::Smtp

1 New Member
I'm having a problem with Net::Smtp. Does the datasend() method have problems sending strings containing single quotes?

Like I stored the string "Germany's biggest bank, hired" in a hash and it prints out fine when i retrieve the scalar value.
But i do datasend($msg) and when i open the email I see something like "Germany's bigges! t bank, hired". These "!" are popping all over the place.

Any thoughts would be greatly appreciated.
Oct 25 '06 #1
1 1816
miller
1,089 Recognized Expert Top Contributor
No it doesn't have a problem with single quotes. I suppose that the lines of your body are simply too long, and therefore they are being truncated. I cannot predict exactly what your problem is, so I would suggest that you attempt a solution by using MIME::Lite in combination with Net::SMTP.

Expand|Select|Wrap|Line Numbers
  1. # Create Message
  2. my $msg = MIME::Lite->new(@content);
  3.  
  4. # Send E-mail
  5. my $smtp = Net::SMTP->new($MAIL_SERVER,
  6.     Hello    => $MAIL_SERVER,
  7.     Port    => $MAIL_PORT,
  8. );
  9. $smtp->mail($from);
  10. $smtp->recipient(@recipients, { SkipBad => 1});
  11.  
  12. $smtp->data($msg->as_string());
  13. $smtp->dataend();
  14.  
Oct 25 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
13695
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It connects to the server and prints the banner but will not send mail. Here is my script: use Net::SMTP; my $smtp =...
0
1283
by: chavez | last post by:
My SMTP server requres me to login before sending e-mail. Is there anyway to authenticate using System.Web.Mail.SmtpMail ? - chavez
2
10839
by: hstockbridge5 | last post by:
Hi, My company's Exchange team created a mailbox for our department with an ampersand in the SMTP e-mail address (e.g. ABCD&EFG@domain.com.) Is it possible to create a mailto link that can incorporate (resolve) the ampersand? Any help you can lend would be appreciated. Henry
0
1326
by: peterson | last post by:
I was trying to send asp.net-smtp mail of UTF-8 unicode international character contents. When I opened the mailbox contents was broken. I am using html format too. Am I missing something?
2
1268
by: Mart | last post by:
hi, urgent assistance needed I have been developing some webforms in VB.NET that have email submissions. I developed them locally using VS .NET 2003 on XP Prof. Then tested them on our development server running Win Server 200 and IIS 5.0. all was fine til i put them live on a new Intranet server using Windows
11
2704
by: ibiza | last post by:
Hi all, I am trying to use the System.Net.Mail class for the first time, with ASP.NET 2.0. I setup everything according to http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me a working environment for sending mails. I am sure the code is correct, there are no errors and everything seems
1
1607
by: NARSIREDDY | last post by:
Hi, I want to setup SMTP server using IIS to send mails through ASP.Net. I request you to pls help in this regard. yours amiably, narsi reddy
5
5294
by: jimhill10 | last post by:
I have a perl script that creates an email attachment file from POST data on a web page. This works just fine. I want to customize the email body to contain all of the text data from the file itself. I thought this would be just a matter of using the $smtp->datasend($POSTvalues) with the $values coming from the names on the web page posting the...
5
7326
by: veralee | last post by:
I'm in dire need to use Net::SMTP. The server no longer uses "sendmail". I found an example of using Net::SMTP but I have to also include a user name and password for the server. The host provided that, and I discovered that the method call is, auth ( USERNAME, PASSWORD ). But I don't know where to put that call. The host isn't into Perl and I'm...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.