Problem with SmtpMail with Microsoft Windows 2000 Server and Microsoft Windows XP Professional

have this problem when use the Imports System.Web.Mail


 If CStr("Microsoft Windows XP Professional").Equals(Session("SO")) Then
                    Dim objectEmail As New MailMessage()
                   
                    objectEmail.From = from.text
                    objectEmail.To = to.text
                    objectEmail.Subject = subject.text
                    objectEmail.Body =body.text
                    objectEmail.Attachments.Add((New System.Web.Mail.MailAttachment("file path")))              
                    SmtpMail.Send(objectEmail)
            Else
                If CStr("Microsoft Windows 2000 Server").Equals(Session("SO")) Then
                    SmtpMail.SmtpServer = "SMTP server"      
                    SmtpMail.Send(from.text, to.text, subject.text, body.text)
                End If
            End If

In this method i can both send mail,
now the problem is in Microsoft Windows 2000 Server cant send attachment, because if i try make the method of Microsoft Windows XP Professional, like send simple mail in my w2k, "i think is a problem of objectEmail" , just  gives me error, and the only way to send a mail in my w2k server is this method, do you now a way to send attachment in w2k, by this method?.

Remember, everything have a solution....
0
ponto
9/13/2005 9:20:48 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

6 Replies
769 Views

Similar Articles

[PageSpeed] 19

First, W2K sends attachments fine.  Can you post the error message you're getting?

Jeff
Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
0
jeff
9/13/2005 1:32:07 PM
if i do the XP method in my windows 2000 server just give me this error:


Error Message: System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: Invalid mail attachment 'G:\e74.jpg'. at System.Web.Mail.MailAttachment.VerifyFile() at System.Web.Mail.MailAttachment..ctor(String filename) at BDSI.Ficha.MessageBox1_YesChoosed(Object sender, String Key) in C:\Inetpub\wwwroot\BDSI\Ficha.aspx.vb:line 466 at MessageBox.MessageBox.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain() --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

AND:

Error Message: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain() at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

AND:

[COMException (0x80040211):

 AND:
[HttpException (0x80004005): Não foi possível aceder ao objecto 'CDO.Message'.] System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) System.Web.Mail.CdoSysHelper.Send(MailMessage message) System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText) System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText)  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) System.Web.UI.Page.ProcessRequestMain()

in the XP works fine
Oh, one thing i almost forget

if i try the windows 2000 server method in the XP, doesnt work thats why i have this validation, this methos only work in one of the diferent OS, dont now why????

Remember, everything have a solution....
0
ponto
9/13/2005 1:57:04 PM
If both servers ( 2000 and xp) have the SAME framework version - there should be no difference..
this line does not look correct...
SmtpMail.SmtpServer = "SMTP server"
you need either an IP address or a fully qualified server name (e.g.  mail.verizon.net)
Your code is defaulting to "localhost" since
"SMTP server" doesn't resolve to any server.

Do both servers  run SMTP service ?

check out www.systemwebmail.com


Hope That Helps
All that wander, are not lost...
What were we talkin bout
0
uncleb
9/13/2005 6:10:05 PM
yes i now that SmtpMail.SmtpServer
need the ip or name server, but for security reason i dont give and i
was giving a example, that isnt the problem because i send mails, what
i cant send is attachments in windows 2000 server, yes both have the
same framework and yes both run the smtp service i check services and
they are in run, was the first thing i do when this problem happen....

Please need to now if this is a normal problem or have any ideas to send attachments with this method with W2k, BECAUSE DONT WORK like XP thanks....

Remember, everything have a solution....
0
ponto
9/13/2005 8:44:41 PM
I would say not normal - since I have sent email with attatchment on win2k with default settings.
try using the server.mappath method as shown on systemwebmail.com...
Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
Dim attachment As New MailAttachment(Server.MapPath("test.txt")) 'create the attachment
mail.Attachments.Add(attachment) 'add the attachment
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)


and also this from the FAQ there
http://www.systemwebmail.com/faq/1.5.aspx

and from that FAQ.....

Another interesting fact, is how SWM decides to use either the
CDONTS.Newmail or the CDO.Message object.
When the SmtpMail class sends
the MailMesage, the SmtMail class checks the OS version. If the version
is <= 4, the CDONTS.Newmail object is used. For all OS’s greater
than 4, the CDO.Message object is used
.
Again, using Anakrino, the SmtpMailSend.gif screen shot verifies this behavior.
Because of this condition, troubleshooting SWM can become interesting, when moving the code to different OS’s.


Hope that helps - sorry no real answers - but maybe that will point you on right path





Hope That Helps
All that wander, are not lost...
What were we talkin bout
0
uncleb
9/14/2005 12:32:40 AM
working now, you were right about Cdonts adn CDO.message.

Thanks for helping me


Remember, everything have a solution....
0
ponto
9/14/2005 9:04:18 AM
Reply:

Similar Artilces:

The Microsoft Windows Malicious Software Removal Tool helps remove specific, prevalent malicious software from computers that are running Windows Server 2003, Windows XP, or Windows 2000
The Microsoft Windows Malicious Software Removal Tool helps remove specific, prevalent malicious software from computers that are running Windows Server 2003, Windows XP, or Windows 2000 http://support.microsoft.com/?id=890830 *********************************************************** Quote *********************************************************** Microsoft has released the Microsoft Windows Malicious Software Removal Tool to help remove specific, prevalent malicious software from computers that are running Microsoft Windows Server 2003, Microsoft Windows XP, or Microsoft W...

Microsoft Confirms Flaw In Windows Servers Microsoft Confirms Flaw In Windows Servers
Microsoft has confirmed the flaw that has been detected in Microsoft Windows, which can be exploited by malicious users to compromise a vulnerable system. The vulnerability is caused due to an error within WINS (Windows Internet Name Service) during the handling of replication packets. This flaw can be exploited to write 16 bytes to an arbitrary memory location by sending a specially crafted WINS replication packet to a vulnerable server, claims security research firm Secunia. http://www.cxotoday.com/cxo/jsp/article.jsp?article_id=2371&cat_id=909 -- Regard: Joh@nnes � :-)) ...

Microsoft to Release Windows XP Home Edition N and Windows XP Professional N in Europe
REDMOND, Wash. - June 8, 2005 - Microsoft Corp. today announced the timetable for availability of Windows� XP Home Edition N and Windows XP Professional N, the two versions of the Windows operating system created as part of the company's compliance with the European Commission's decision of March 2004. Originally released to computer makers in January 2005, the latest versions of the XP operating systems without Windows Media Player follow further clarifications from the European Commission. These products will be made available to computer manufacturers on June 15 in English, ...

Microsoft Windows Messenger 5.1 for Windows 2000, XP, 2003 updated
Microsoft Windows Messenger 5.1 for Windows 2000, XP, 2003 updated Download page http://www.microsoft.com/downloads/details.aspx?FamilyID=a8d9eb73-5f8c-4b9a-940f-9157a3b3d774&DisplayLang=en direct to file: http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=a8d9eb73-5f8c-4b9a-940f-9157a3b3d774&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fe%2fb%2f3%2feb3b95c6-b6e3-47f6-bcd1-466ad173f407%2fmessenger.msi or maybe it is just: http://download.microsoft.com/download%2fe%2fb%2f3%2feb3b95c6-b6e3-47f6-bcd1-466ad173...

Network Adapter Drivers for Windows* 2000, Windows* XP and Windows Server* 2003
http://downloadcenter.intel.com/scripts-df-external/Detail_Desc.aspx?agr=Y&ProductID=&DwnldID=4275&strOSs=OSFullName=&lang=eng or: http://preview.tinyurl.com/2ntk46 Installs base drivers, Intel� PROSet for Windows* Device Manager, and Advanced Networking Services (ANS) for Intel� network adapters for Windows* 2000, Windows* XP, and Windows Server* 2003. Download the self-extracting archive and run it. When you run it, it will extract the files to a temporary directory, run the installation wizard, and remove the temporary files when the installation is complet...

Your Internet Explorer home page is reset to "about:blank" and Windows AntiSpyware (Beta) unexpectedly quits in Windows 2000, Windows XP, or Windows Server 2003
followup to grc.security.software Your Internet Explorer home page is reset to "about:blank" and Windows AntiSpyware (Beta) unexpectedly quits in Windows 2000, Windows XP, or Windows Server 2003 http://support.microsoft.com/kb/894269/EN-US/ ----------------------------------------------------------- Quote ----------------------------------------------------------- Article ID : 894269 Last Review : February 25, 2005 Revision : 1.0 SYMPTOMS On a computer that is running Microsoft Windows 2000, Microsoft Windows XP, or Microsoft Windo...

Problem accessing sql server on windows server 2003 from windows xp or another domain
Hi, i am digamber i have created a .Net class library for data access, I have sql server 2000 installed in windows server 2003. but when i try to access the database from another domain where we are creating Presentation logic like we are accessing it from winXP, i  am getting a sql server does not exist or access denied error message, but it is running well when i connect from same Domain having sql server 2000 installed i.e windows 2003 server. I am not understanding the cause of problem, i have active directroy installed on the windows server 2003 but other domains are not part ...

Windows Server 2008, Microsoft SQL Server 2008 and Microsoft Visual Studio 2008 Launched!
Largest enterprise launch in company history includes Windows Server 2008, Microsoft SQL Server 2008 and Microsoft Visual Studio 2008; focuses on security, Web, virtualization and better business intelligence. LOS ANGELES - Feb. 27, 2008 - Kicking off more than 225 events around the world and joined by more than 4,000 customers and partners, Microsoft Corp.'s Chief Executive Officer Steve Ballmer today showcased the next generation of infrastructure and application platform products, including Windows Server 2008, Microsoft Visual Studio 2008 and Microsoft SQL Server 2008....

IBM OEM Microsoft Windows XP And Windows XP SP1 Default Administration Account Vulnerability
IBM OEM Microsoft Windows XP And Windows XP SP1 are both reported to contain a default passwordless administrative account. Reportedly, during the installation process of IBMs OEM version of Windows XP and Windows XP SP1, the process automatically creates an administrator account and fails to set a password for it. The user is not made aware of the account during installation. Users installing this version of Microsoft Windows may fail to properly secure this account, allowing for local attackers to gain administrative privileges. Network access to accounts without passwords ...

Windows 200 Professional vs Windows 2000 Server
Can I install ASE 11.9.2 on a Windows 2000 Professional machine or do I need at least Windows 2000 Server? I understand that W2K-Pro is the upgrade from WNT40 Workstation and W2K-Server is from WNT40 Server. Am I right? I want to install ASE over W2K-Pro on a notebook for demo presentations to new clients, so I don't need any outside access to the databse server appart from the PB applications that will be installed on the same machine. This same question applies to EAServer (Jaguar). Thanks for helping! ASE will run just as well on either version. There are (or at least...

Windows 2000 Server or Windows Server 2003
Okay, hold your breath and try to not slug me for this one. I have a 450 MHz machine, a desktop actually. I have made Windows Server 2003 run on this and ASP.NET worked great. I am, however, concerned with performance. The system has 270 MB RAM. I don't know if the improvements from 2000 Server to 2003 Server are worth putting the latter on a slower machine. This is to be an IIS server. Comments? is it going to be a production server, or just a development box? (probably a stupid question, but you never can tell these days) for a development server performance is less of a co...

Windows XP To Windows 7 A Risky Path, Microsoft Warns
Businesses that skip Windows Vista and upgrade their computers directly from the XP operating system to Windows 7 could expose themselves to security risks and other problems, Microsoft says in a new white paper. Bypassing Vista could have "implications for security, support, and regulatory compliance and reduce flexibility in the face of changing business requirements," writes Microsoft VP Mike Nash, in the paper. Specifically, Nash says that businesses that wait for Windows 7 -- set for release in late 2009 or early 2010 -- to upgrade from XP could find themselv...

Disabling Windows File Protection in Windows 2000 and Windows XP
This short article is intended to clear up confusion about how to disable Windows File Protection. I've seen errant information posted in many places and felt it necessary to sum up the truth of the matter. When Windows File Protection was first introduced in Windows 2000 I found it bothersome. After doing some research on how to disable it I was surprised to learn that Microsoft only provided a mechanism to do so when a kernel debugger is active by setting the SFCDisable registry value to 1 or 2 . The MSDN article describing this is here: http://support.microsoft.com/support/kb...

Microsoft Windows XP Professional Bugging Device?
Context, context, context. I was sick hearing that phrase from Egyptologists in regards to my research on the Great Pyramid. They never could grasp that context is irrelevant to the scientific process or methodology, science examines facts, not interpretation. In saying that, they taught me a lot, it is funny how the entire aspect of a thing or situation can change, just by applying a different context to it. In this article, I intend to do just that, with Microsoft's Windows Operating System. If you have ever wondered, if; 1. Microsoft, was secretly spying on end-user machines? ...

Web resources about - Problem with SmtpMail with Microsoft Windows 2000 Server and Microsoft Windows XP Professional - asp.net.getting-started

Professional - Wikipedia, the free encyclopedia
In narrow usage, not all expertise is considered a profession. Although sometimes referred to as professions, occupations such as skilled construction ...

Richie McCaw ends All Blacks career with retirement from professional rugby
Richie McCaw departs with global acknowledgement as the game's finest flanker, one of the best players of all time and as an outstanding leader. ...

Thousands of health professionals 'actively monitored' to protect public: AHPRA
Thousands of health professionals are being actively monitored by authorities because they have a criminal history, drug problem, health impairment, ...

Adobe creative professionals offer first hands-on impressions using iPad Pro
Adobe is one company patiently waiting for the launch of the new iPad Pro as the firm in recent months has prepared for what it expects to be ...

Sandra Smith Says Fox Biz Will ‘Host A Professional, Informative Debate’
Tomorrow night’s GOP debate on Fox Business Network is arguably the most important night in the history of the network. It’s the first time the ...

A Bold and Textured Bachelor Pad — Professional Project
Pin it Project by: Denise Wilson Location: New York, New York Now this is how you do texture! From the walls, to the rugs, to the pillows there ...

Why aren’t there more professional apps for the iPad Pro?
Much has been made about the lack of professional software for the iPad Pro so far. This is a problem that doesnt look to go away anytime soon, ...

Michael Fassbender is so sexy, even professional horses get turned on
Just in case anyone needed some Michael Fassbender today, I wanted to cover these two clips from this weekend’ Graham Norton Show . Personally, ...

American Airlines Loses Professional Dancer’s $250K Prosthetic Leg, Finds It In Another Country
If you thought the airline losing your suitcase of souvenirs was rough, imagine if they lost a bag with your prosthetic leg. That’s apparently ...

What Is New In Sustainability Reporting? What Do Supply Chain Professionals Need To Know About It?
These kinds of reports help supply chain and operations professionals understand what may be required of them in the not so distant future. So ...

Resources last updated: 11/27/2015 1:45:49 AM