473,466 Members | 1,394 Online
Bytes | Software Development & Data Engineering Community
Create 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 1802
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
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...
0
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
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...
0
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
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...
11
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...
1
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
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...
5
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
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...
0
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.