简体   繁体   English

VB.net在不知道SMTP的情况下发送电子邮件

[英]VB.net Send Email without knowing SMTP

I want to send an e-mail without knowing SMTP. 我想发送一封不知道SMTP的电子邮件。

I mean, i want my users to mail me through my soft, but the problem is that i don't know their @mail, then i don't know SMTP either. 我的意思是,我希望我的用户通过我的软件向我发送邮件,但是问题是我不知道他们的@mail,然后我也不知道SMTP。

I'm stuck here, thanks ! 我被困在这里,谢谢!

The easiest way may be to send an email through their own email client. 最简单的方法可能是通过自己的电子邮件客户端发送电子邮件。

This code will open their default mail client and populate it with the specified adress subject and body: 此代码将打开其默认邮件客户端,并使用指定的地址主题和正文填充它:

    Dim address As String = "reg@gmail.com"
    Dim subject As String = "Help"
    Dim body As String = "Please help me with this error"

    Process.Start(String.Format("mailto:{0}?subject={1}&body={2}", address, subject, body))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM