473,699 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SmtpMail delivers incomplete body

I'm using the System.Web.Mail .SmtpMail class to send email from an app
I wrote. I needed to install IIS to get it to send the messages even
though I wanted to use an existing SMTP server. Anyway, I got it to
send messages for me which is great.... Unfortunately, I do not
receive the complete contents of the Body. I have ran a few tests to
see what the Body contained before and after the SmtpMail.Send() call
and they matched. Something down the line messed it up so that only
part of the message is delivered. Any help would be very much
appreciated! Thanks!
Jul 21 '05 #1
3 1467
Post you code. I have done this with no problems.

"Edwin G. Castro" <ec*****@hp.com > wrote in message
news:d9******** *************** ***@posting.goo gle.com...
I'm using the System.Web.Mail .SmtpMail class to send email from an app
I wrote. I needed to install IIS to get it to send the messages even
though I wanted to use an existing SMTP server. Anyway, I got it to
send messages for me which is great.... Unfortunately, I do not
receive the complete contents of the Body. I have ran a few tests to
see what the Body contained before and after the SmtpMail.Send() call
and they matched. Something down the line messed it up so that only
part of the message is delivered. Any help would be very much
appreciated! Thanks!

Jul 21 '05 #2
ec*****@hp.com (Edwin G. Castro) wrote in message news:<d9******* *************** ****@posting.go ogle.com>...
I'm using the System.Web.Mail .SmtpMail class to send email from an app
I wrote. I needed to install IIS to get it to send the messages even
though I wanted to use an existing SMTP server. Anyway, I got it to
send messages for me which is great.... Unfortunately, I do not
receive the complete contents of the Body. I have ran a few tests to
see what the Body contained before and after the SmtpMail.Send() call
and they matched. Something down the line messed it up so that only
part of the message is delivered. Any help would be very much
appreciated! Thanks!


I ran a few more tests and I discovered that when I write the body
contents to a file (body.html) that all the contents are there as
expected. If I open the file (body.html) in Visual Studio .NET I get
some interesting results. The first result is that when I first view
the file in Design mode I see all the contents as expected. When I
switch to HTML mode Visual Studio .NET automaticaly formats the file
and I loose the end of the file just like when I receive the messages
through email. If I swith back to Design mode after the file has been
formated then I can't see the end of the file.

It looks like .NET is performing a similar kind of formatting since
the result is exactly the same.
Jul 21 '05 #3
ec*****@hp.com (Edwin G. Castro) wrote in message news:<d9******* *************** ****@posting.go ogle.com>...
I'm using the System.Web.Mail .SmtpMail class to send email from an app
I wrote. I needed to install IIS to get it to send the messages even
though I wanted to use an existing SMTP server. Anyway, I got it to
send messages for me which is great.... Unfortunately, I do not
receive the complete contents of the Body. I have ran a few tests to
see what the Body contained before and after the SmtpMail.Send() call
and they matched. Something down the line messed it up so that only
part of the message is delivered. Any help would be very much
appreciated! Thanks!


I determined the cause of the problem.

The file I was reading to generate my email from contained '\x0'
characters. Microsoft tools generate the file and I was not aware of
that. In any case, those characters were causing SmtpMail to think the
end of the body had arrived. I added a simple call to
string.Trim('\x 0') to remove the offending characters and the problem
is now solved!
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5047
by: Ed Sutton | last post by:
How can I show the email client UI so the user can send the attachment to the desired recipient. I get an exception if I leave the MailMessage.To property blank. Is there any way to do this? I found a Microsoft example that uses mapi32.dll that can do this. But I can nopt make the SmtpMail work like I want. Thanks in advance, -Ed
3
2697
by: Renato Giron | last post by:
I am trying to use an aspx page to send email using the smtpMail class and my smtp server . When I click send but when I check my inbox no messages appear. The page doesn't give any errors. I doble checked and my code behing seems find: Dim objmail As New Web.Mail.MailMessage() objmail.From = "renato@myserver.com" objmail.To = "renato@myserver.com"
3
2015
by: JJBW | last post by:
Hi I am having a bit of a problem with SmtpMail. I have a bit of code that should send an email but when it is executed no email turns up. MailMessage mmNotify = new MailMessage(); mmNotify.From = ; mmNotify.To = ; mmNotify.BodyFormat = MailFormat.Text;
5
2146
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. --------------------------------------------------------------------------------
5
1735
by: Wayne Wengert | last post by:
I am trying to build an aspx page that will send customized emails to a list of email addresses (in a SQL Server table) where each email has a customized hyperlink. As part of the body of the outgoing message I want a section that is something like: ========================================= Click on the following link to verify your email address: http://mysite.com/mypage.aspx?i=nnn =========================================
3
1560
by: aslantifosi | last post by:
hi all, My question is about that i use a smpt server which is running on a different machine from my webserver machine. And i can authenticate with a user and password. I use SmtpMail class. i set the smtpserver property. but how can i authenticate with my user and pass? for ex: my user :xxxx@xxx.com pass :12345
1
1471
by: B-Dog | last post by:
I've built a form that I want to use to email some of the information off it to a few users which will include a link to a folder on our network. I'm trying to send it in html format but when the message is received all you see is the html code and not just the text. I've included the code below but I'm a rookie so I must be missing something or doing something wrong. Thanks! Barclay Sub sendmail()
3
276
by: Edwin G. Castro | last post by:
I'm using the System.Web.Mail.SmtpMail class to send email from an app I wrote. I needed to install IIS to get it to send the messages even though I wanted to use an existing SMTP server. Anyway, I got it to send messages for me which is great.... Unfortunately, I do not receive the complete contents of the Body. I have ran a few tests to see what the Body contained before and after the SmtpMail.Send() call and they matched. Something down...
5
1880
by: senol | last post by:
UPLOAD bu class public static void ResimYükle(HtmlInputFile HtmlInput, string id,string Klasor,string KatID) { string path_file;
0
9033
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8882
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7748
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4375
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
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 we have to send another system
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.