PDA

View Full Version : import



aley
جمعه 06 خرداد 1384, 18:02 عصر
با اضافه کردن دستور import namespace در برنامه ام خطا میگیرم لطفا کمکم کنید
این برنامه است:
<%@ Import Namespace="System.Web.Mail" %>

<Script Runat="Server">

Sub Page_Load
Dim mailMessage As SmtpMail

mailMessage.Send( _
"bob@somewhere.com", _
"alice@somewhere.com", _
"Sending Mail!", _
"Hello!" )
End Sub

</Script>

<html>
<head><title>ImportNamespace.aspx</title></head>
<body>

<h2>Email Sent!</h2>


</body>
</html>
[/img]

AspNet
جمعه 06 خرداد 1384, 18:05 عصر
بهتره که خطا رو اینجا بنویسید و دستور کامل رو

Behrouz_Rad
جمعه 06 خرداد 1384, 22:47 عصر
مسلمه که باید خطا بده.
شما داری برنامه رو روی سیستم خودت اجرا می کنی. (هر چند که با یک سری تنظیمات میشه کاری کرد که سیستم شما به عنوان گیرنده و ارسال کننده ایمیل عمل کنه)
این آدرس گیرنده ایمیلی که شما دادی، به کجا باید بره؟


The Microsoft SMTP Service
The Microsoft SMTP Service does the basic job of sending and retrieving email in accordance with the Simple Mail Transport Protocol (SMTP). In some ways it is very limited. The service does not support the Post Office Protocol (POP). This means that you cannot use the service to create mailbox accounts for multiple users or retrieve email from the service using an email client, such as Outlook or Eudora. If you need to create a full-blown email system that goes beyond support for basic SMTP, you will need to invest in additional software, such as Microsoft Exchange Server or Software.com's Post.Office (see http://www.software.com).

On the positive side, the Microsoft SMTP Service is valuable for sending automated messages from your Web site. The service can support sending thousands of email messages a day. For example, you can use it to send automatic notification messages to the users of your Web site.

Configuring the Microsoft SMTP Service
To check whether the SMTP Service is installed and running on your server, open the Internet Services Manager and see whether an icon labeled Default SMTP Virtual Server is listed beneath the name of your server (see Figure 26.1). If the service is installed but not running, start the service by selecting Action, Start.
A single computer can have multiple SMTP Virtual Servers. Each SMTP Virtual Server is identified by an IP address and domain name. An SMTP Virtual Server can contain one default local domain and zero or more alias domains.

When the SMTP Service is installed, a single default local domain is created. The name of the default local domain determines how the service delivers messages. If the service receives an email message that is addressed to the same domain as the default local domain, it is delivered locally; otherwise, the service attempts to send it somewhere else.

NOTE

The name of the default local domain is determined by the name designated on the DNS tab for the TCP/IP protocol in the Network application in the Control Panel.






How the Microsoft SMTP Service Works
From a user's perspective, the SMTP Service is a simple component. The service uses two main directories, named Pickup and Drop, to process email. Both of these directories are located, by default, under the InetPub\MailRoot directory.

The Pickup directory is used to send email. The service constantly monitors the Pickup directory for new email messages. Whenever it finds an email message, the service attempts to send it. If the service is unable to immediately deliver the message, it is kept in the Queue directory while the service attempts to keep delivering the message. If the email message cannot be delivered and cannot be returned to the sender, the message is moved to the Badmail directory.

The Drop directory is used to receive email. When email messages are received by the SMTP Service, the service writes out the messages to the Drop directory. It doesn't do anything else with them; they just stay there. Again, the Microsoft SMTP Service does not support multiple mailboxes.

The email messages in these two directories are nothing more than text files. For example, you can send an email message by opening Notepad, entering the following text, and saving the file in the Pickup directory (Inputpub\mailroot\pickup):



To: Webmaster@Superexpert.com
From: someone@somewhere.com
Subject: Testing SMTP Service

Here is the message!

As soon as you save the file, the file should disappear from the Pickup directory because the SMTP Service is attempting to send it.

aley
شنبه 07 خرداد 1384, 09:45 صبح
ممنونم از راهنمایی خوبتون مشکلم حل شد!!!!!!!!! :موفق: