2011-05-24 105 views
0

我是新来的asp.net,我想在我的网站上有一个照片比赛。aspx电子邮件图片提交

我希望用户在我的网站上上传他们的照片,并且我希望收到附有照片附件的电子邮件。

我怎么能做到这一点,是有这样做的更好的方法(我要使用这个ASP)通过使用FileUpload三夏

感谢, 插孔

回答

0

那么,如果你想要做的它在VB中,你会做这样的事情:

Dim message As New Mail.MailMessage 
Using message 

    message.To.Add(New Mail.MailAddress("[email protected]", "Name Reciever")) 

    message.From = New Mail.MailAddress("[email protected]", "Name Sender") 
    message.Subject = "subject!" 
    message.Body = "Text!" 

    message.Attachments.Add(New Mail.Attachment("pic.jpg")) 

    Using smtp As New Net.Mail.SmtpClient("Your smtp") 
         smtp.Send(message) 
End Using 

但你的概率使用C#,但你din't这么说...但它看起来概率无论如何都^^