Har letat efter kod som skickar iväg från detta enkla formulär med Asp.net men får inget att funka. Någon som kan enkel kod för detta? Samt hur ska koden vara, i samma fil eller en seperat bakgrunds fil för kod?
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress("me@mycompany.com")
mail.To.Add("you@yourcompany.com")
'set the content
mail.Subject = "This is an email"
mail.Body = "this is a sample body with html in it. <b>This is bold</b> <font color=#336699>This is blue</font>"
mail.IsBodyHtml = True
'send the message
Dim smtp As New SmtpClient("127.0.0.1")
smtp.Send(mail)
264 ms totalt · 4 externa anrop · v20260731065814-full.6fe65c25