Imports System.web.mail
Imports System.Text
Public Function sendMailCreaLLUsr()
' Variable which will send the mail
Dim obj As System.Web.Mail.SmtpMail
'Variable to store the attachments
Dim Attachment As System.Web.Mail.MailAttachment
'Variable to create the message to send
Dim Mailmsg As New System.Web.Mail.MailMessage
'Set the properties
'Assign the SMTP server
obj.SmtpServer = "NOMBRE DE SERVIDOR"
'Multiple recepients can be specified using ; as the delimeter
'Address of the recipient
''Mailmsg.To = txtTo.Text
Mailmsg.To = "
[email protected]" '''
'Your From Address
''Mailmsg.From = "
[email protected]"
'Specify the body format
'''If chkFormat.Checked = True Then
''Mailmsg.BodyFormat = MailFormat.Html 'Send the mail in HTML Format
''Else
Mailmsg.BodyFormat = MailFormat.Text
''End If
'Mail Subject
''Mailmsg.Subject = txtSubject.Text
Mailmsg.Subject = "Saludos aqui"
'Attach the files one by one
''For Counter = 0 To lstAttachment.Items.Count - 1
''Attachment = New MailAttachment(lstAttachment.Items(Counter))
'Add it to the mail message
''Mailmsg.Attachments.Add(Attachment)
''Next
'Mail Body
''Mailmsg.Body = txtMessage.Text
Mailmsg.Body = "Hola Mundo "
obj.Send(Mailmsg)
'''MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
End Function