473,290 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,290 software developers and data experts.

problem with Net::Smtp

1
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 1796
miller
1,089 Expert 1GB
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.