Commit inicial Ventas Productivo
This commit is contained in:
19
Otros/MassiveMail.aspx
Normal file
19
Otros/MassiveMail.aspx
Normal file
@@ -0,0 +1,19 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="MassiveMail.aspx.vb" Inherits="Otros_MassiveMail" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
|
||||
Envío Masivo de Mail
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Para</td>
|
||||
<td><asp:TextBox ID="TxtMail" runat="server" TextMode="MultiLine" Height="115px" Width="500px"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><asp:Button ID="BtnEnviar" runat="server" Text="Enviar" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
|
||||
115
Otros/MassiveMail.aspx.vb
Normal file
115
Otros/MassiveMail.aspx.vb
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Otros_MassiveMail
|
||||
Inherits System.Web.UI.Page
|
||||
|
||||
Protected Sub BtnEnviar_Click(sender As Object, e As EventArgs) Handles BtnEnviar.Click
|
||||
Dim StrSQL As New StringBuilder
|
||||
StrSQL.Append(" <div><p class=""MsoNormal"" align=""center"" style=""text-align:center""><span style=""font-size:13.5pt;font-family:'Trebuchet MS',sans-serif"">Con profundo pesar ")
|
||||
StrSQL.Append(" nos unimos a la pena que embarga a la familia de nuestro querido amigo y socio honorario, ")
|
||||
StrSQL.Append(" <b>Luis Palafox Jaúregui</b>, por su sensible fallecimiento acaecido el día de ")
|
||||
StrSQL.Append(" hoy en la ciudad de Hermosillo, Sonora.</span></p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""> </p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""><span style=""font-size:13.5pt;font-family:'Trebuchet MS',sans-serif"">Nuestras más ")
|
||||
StrSQL.Append(" sinceras condolencias. </span></p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""> </p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""><b><span style=""font-size:13.5pt;font-family:'Trebuchet MS',sans-serif"">Q.E.P.D. Luis ")
|
||||
StrSQL.Append(" Palafox Jaúregui. </span></b></p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""> </p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""> </p> ")
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" <p class=""MsoNormal"" align=""center"" style=""text-align:center""><span style=""font-family:'Trebuchet MS',sans-serif"">El día de mañana miércoles 31 de ")
|
||||
StrSQL.Append(" diciembre se celebrará la ceremonia luctuosa a las 11:00 AM en la parroquia de ")
|
||||
StrSQL.Append(" Santa Elena en Blvd. Real del Arco Col</span>. <span style=""font-family:'Trebuchet MS',sans-serif"">Valle ")
|
||||
StrSQL.Append(" Escondido</span></p> ")
|
||||
|
||||
|
||||
Dim ObjProspecto As New ClsProspectos()
|
||||
While ObjProspecto.GetNext() AndAlso ObjProspecto.DtResultados.Rows.Count > 0
|
||||
'MandaMail(ObjProspecto.DtResultados.Rows(0)("CveContacto").ToString, ObjProspecto.DtResultados.Rows(0)("Mail").ToString, ObjProspecto.DtResultados.Rows(0)("Mail2").ToString, "Experiencias de las mujeres en la minería", "Estimados socios en el marco de la celebración del Día Internacional de la Mujer les reenviamos la convocatoria para participar en el libro ""Experiencias de las mujeres en la minería"" suplicándoles que la hagan extensiva entre sus compañeras de trabajo. Saludos cordiales. AIMMGM.AC Distrito Sonora")
|
||||
MandaMail(ObjProspecto.DtResultados.Rows(0)("CveContacto").ToString.ToEntero, ObjProspecto.DtResultados.Rows(0)("Mail").ToString, ObjProspecto.DtResultados.Rows(0)("Mail2").ToString, "Nota luctuosa", StrSQL.ToString)
|
||||
'MandaMail(0, "julian@adsistemas.mx", "juulian@hotmail.com", "Nota luctuosa", StrSQL.ToString)
|
||||
End While
|
||||
ObjProspecto.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub MandaMail(CveContacto As Integer, Para As String, CCP As String, Asunto As String, Cuerpo As String)
|
||||
' Dim ObjMail As New ClsSisMail()
|
||||
' If ObjMail.MandacorreoAIMMGM(Para, CCP, Asunto, Cuerpo, "D:\AIMMGM\Correos\AIMMGAC FELICITA 280314.jpg") Then
|
||||
' Dim ObjProspecto As New ClsProspectos()
|
||||
' ObjProspecto.UpdateAviso(CveContacto)
|
||||
' ObjProspecto.Dispose()
|
||||
' Else
|
||||
' Dim ObjProspecto As New ClsProspectos()
|
||||
' ObjProspecto.UpdateAvisoError(CveContacto, ObjMail.StrError)
|
||||
' ObjProspecto.Dispose()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub MandaMail(CveContacto As Integer, Para As String, CCP As String, Asunto As String, Cuerpo As String)
|
||||
'Dim ObjMail As New ClsSisMail()
|
||||
'If ObjMail.MandacorreoAIMMGM(Para, CCP, Asunto, Cuerpo) Then '"D:\AIMMGM\Correos\Acta mes de abril.pdf", "D:\AIMMGM\Correos\Orden del dìa Mayo 2014.pdf"
|
||||
' Dim ObjProspecto As New ClsProspectos()
|
||||
' ObjProspecto.UpdateAviso(CveContacto)
|
||||
' ObjProspecto.Dispose()
|
||||
'Else
|
||||
' Dim ObjProspecto As New ClsProspectos()
|
||||
' ObjProspecto.UpdateAvisoError(CveContacto, ObjMail.StrError)
|
||||
' ObjProspecto.Dispose()
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
'Public Sub EmbeddedImages()
|
||||
|
||||
' 'create the mail message
|
||||
' Dim mail As New MailMessage()
|
||||
|
||||
' 'set the addresses
|
||||
' mail.From = New MailAddress("from@fromdomain.com", " Display Name")
|
||||
' mail.To.Add("to@todomain.com")
|
||||
|
||||
' 'set the content
|
||||
' mail.Subject = "This is an embedded image mail"
|
||||
|
||||
' 'first we create the Plain Text part
|
||||
' Dim palinBody As String =
|
||||
' "Plain text content, viewable by those clients that don't support html"
|
||||
' Dim plainView As AlternateView =
|
||||
' AlternateView.CreateAlternateViewFromString
|
||||
' (palinBody, Nothing, "text/plain")
|
||||
' 'then we create the Html part
|
||||
' 'to embed images, we need to use the prefix 'cid' in the img src value
|
||||
' Dim htmlBody As String = "<b>Embedded image file.</b><DIV> </DIV>"
|
||||
' htmlBody +=
|
||||
' "<img alt="""" hspace=0 src=""cid:uniqueId"" align=baseline border=0 >"
|
||||
' htmlBody += "<DIV> </DIV><b>This is the end of Mail...</b>"
|
||||
' Dim htmlView As AlternateView =
|
||||
' AlternateView.CreateAlternateViewFromString
|
||||
' (htmlBody, Nothing, "text/html")
|
||||
|
||||
|
||||
' 'create the AlternateView for embedded image
|
||||
' Dim imageView As New AlternateView("c:\attachment\image1.jpg",
|
||||
' MediaTypeNames.Image.Jpeg)
|
||||
' imageView.ContentId = "uniqueId"
|
||||
' imageView.TransferEncoding = TransferEncoding.Base64
|
||||
|
||||
|
||||
' 'add the views
|
||||
' mail.AlternateViews.Add(plainView)
|
||||
' mail.AlternateViews.Add(htmlView)
|
||||
' mail.AlternateViews.Add(imageView)
|
||||
|
||||
' 'send mail
|
||||
' SendMail(mail)
|
||||
|
||||
'End Sub ' End EmbedImages
|
||||
End Class
|
||||
Reference in New Issue
Block a user