如何使用单个按钮单击将pdf从我的本地文件夹发送到我的邮件id(从数据库)

问题描述:

实际上我有一个按钮,当我单击按钮时,我需要将本地文件夹中的pdf文件发送到我的邮件ID,我需要从数据库中获取我的邮件ID,我需要一个按钮单击事件,在仅设计页面"按钮中,请您提供紧急帮助吗?

Actually i ve a button ,when i click the button i need to sent the pdf file from my local folder to my mail id ,i need to get my mail id is from database , i need this from a single button click event, in design page only button, pls can u help me,its urgent

您是否听说过算法?逐步执行逻辑流程,最终您将获得所需的内容.

1.首先从数据库中提取电子邮件取决于userid.
2.从您的机器上获取要附加的PDF文件位置.
3.编写一个SMTP服务器模块以发送带有附件的电子邮件.

工作已完成.
Have you heard about algorithms? Do step by step flow of your logic, in an end you will get what you want.

1. first fetch E-Mail from database depend on userid.
2. get PDF file location from your machine, which you want to attach.
3. Write a SMTP server module to send email with attachment.

Work done.


尝试类似的方法

1.首先选择pdf文件的路径.u可以通过使用方法和属性来做到这一点.net
中有很多 2.使用数据库连接检索邮件ID.
3.对于邮件发送,请使用 MailMessage 类,并使用其属性,例如,来自,附件,优先级,主题,正文并发送邮件.

希望这会有所帮助.
可以在这里获取逻辑并对其进行处理.

问候,
siv
try something like this

1.first choose the path of the pdf file.u can do it by using methods and properties.plenty available in .net
2.use database connection to retrieve the mail-id .
3.for mail sending use the MailMessage class and use its properties like to,from,attachment,priority,subject,body and send the mail.

hope this will be helpful.
jus u can get logic is here and process it.

Regards,
siv