|
-
Oct 29th, 2010, 08:05 PM
#1
Thread Starter
Lively Member
Fake Email Sender
I have this code to send an email:
Code:
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If msgTo.Text = "" Or msgFrom.Text = "" Or msgSubject.Text = "" Or msgBody.Text = "" Or smtpHost.Text = "" Or smtpPort.Text = "" Then
MsgBox("You must fill out everything!", MsgBoxStyle.Information, "Error")
Exit Sub
End If
On Error GoTo msgError
Dim smtpServer As New SmtpClient()
Dim mail As New MailMessage()
smtpServer.Credentials = New Net.NetworkCredential("email", "password")
smtpServer.Port = smtpPort.Text
smtpServer.Host = smtpHost.Text
If SSL.Checked = True Then
smtpServer.EnableSsl = True
Else
smtpServer.EnableSsl = False
End If
smtpServer.EnableSsl = SSL.Checked
mail = New MailMessage()
mail.From = New MailAddress(msgFrom.Text)
mail.To.Add(msgTo.Text)
mail.Subject = msgSubject.Text
mail.Body = msgBody.Text
smtpServer.Send(mail)
MsgBox("Email was sent to:" & msgTo.Text)
Exit Sub
msgError:
MsgBox("Couldn't send email, please make sure the SMTP Settings are correct.", MsgBoxStyle.Critical, "Error")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
smtpHost.Text = "smtp.live.com"
End Sub
End Class
But obviously, it sends them an email from the email that requires the password.
But I want to send emails that appear from what's entered in the 'from' textbox.
How would I go about that?
-
Oct 29th, 2010, 08:20 PM
#2
Re: Fake Email Sender
It seems like to me that, it also count for this poster, lately people are asking how to disguise or how to "hack" a php-form. Where are we going to? Fortunately there are enough people who ask "normal" questions. Thanks for that.
Now back to topic: Where do you want to get the password from?
-
Oct 29th, 2010, 08:25 PM
#3
Re: Fake Email Sender
It's got nothing to do with the email address. It's the SMTP server that's the issue. You can send email from any address you want. What matters is that the system sending the message is authorised to do so on the specified SMTP server. The credentials you are supplying are for the SMTP account, not for the email address.
That said, it may be that some SMTP servers reject messages from a domain other than their own. If so then, again, that's down to the SMTP server and nothing inherent in the SMTP protocol or the System.Net.Mail namespace.
-
Oct 29th, 2010, 08:41 PM
#4
Thread Starter
Lively Member
Re: Fake Email Sender
Do you know any smtp servers that don't need authorization?
-
Oct 29th, 2010, 08:44 PM
#5
Re: Fake Email Sender
??? 99,9% of the SMPT servers need authorization.
-
Oct 29th, 2010, 08:46 PM
#6
Thread Starter
Lively Member
-
Oct 29th, 2010, 10:02 PM
#7
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|