Visual Basic.NET - ENVIAR MAIL

 
Vista:

ENVIAR MAIL

Publicado por Edgar (23 intervenciones) el 09/08/2007 00:43:27
Hola amigos del foro, como estan, espero q bien, me podran ayudar en esto, tengo q enviar un correo electronico desde punto net, estoy realizando mi aplicativo con webfrom, gracias de antemano, saludos
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:ENVIAR MAIL

Publicado por rednred1 (16 intervenciones) el 09/08/2007 10:24:46
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
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar