Home All Groups Group Topic Archive Search About

To send message to several directions of mail

Author
4 Aug 2006 8:35 PM
L.Barzi
I use xpsmpt.dll works to me very well but my question is the following
one:

I use the following code to ejeutar Extended Stored Procedures of sgte
way as it indicates the page http://www.sqldev.net/xp/xpsmtp.htm

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
    @FROM       = N'MyEm***@MyDomain.com',
    @FROM_NAME  = N'Joe Mailman',
    @TO         = N'MyFri***@HisDomain.com',
    @CC         = N'MyOtherFri***@HisDomain.com',
    @BCC        = N'MyEm***@MyDomain.com',

    @priority   = N'HIGH',
    @subject    = N'Hello SQL Server SMTP Mail',
    @message    = N'Goodbye MAPI, goodbye Outlook',
    @type       = N'text/plain',
    @attachments= N'c:\attachment1.txt;c:\attachment2.txt',
    @server     = N'mail.mydomain.com'
select RC = @rc

go



Like podria to send a mail to several directions?



A variable tries of the following way, declaring and enclosing some
post office but at the time of equaling the variable I had problems by
the comiles:



declare @mails varchar(800)
set @mails = 'jorgebarz***@gmail.com; locoba***@hotmail.com;
jzar***@hotmail.com,jgo***@molina.sbn.gob.pe'

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM      = N'lsantiste***@molina.sbn.gob.pe',
@FROM_NAME = N'LITMAN GAYITO',
@TO        = N'jbarz***@molina.sbn.gob.pe',
@CC        = N'@mails',  -- <<-- IGUALANDO VARIABLE
@BCC       = N'powerdevelo***@pilu.com',
@priority  = N'HIGH',
@subject   = N'MENSAJE DE PRUEBA',
@message   = N'HOLA MENSAJE DE PRUEBA',
@type      = N'text/plain',
@server    = N' mail.molina.sbn.gob.pe'

Soon it tries this way

@CC = @mails

Without using N' ' in this part of the code of above

@CC = N'@mails'

Using this I complete change sends the message very well to the
indicated post office but no longer the sent message is registered. The
user who control the message does not have in its registered mail the
sent message.

With example that gives the page of the DLL if it works, somebody
podria to help me.

Thank

Lima - Perú

Author
4 Aug 2006 9:28 PM
Arnie Rowland
Darn Babelfish...

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"L.Barzi" <JorgeBarz***@gmail.com> wrote in message
news:1154723725.467706.181560@h48g2000cwc.googlegroups.com...
I use xpsmpt.dll works to me very well but my question is the following
one:

I use the following code to ejeutar Extended Stored Procedures of sgte
way as it indicates the page http://www.sqldev.net/xp/xpsmtp.htm

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
    @FROM       = N'MyEm***@MyDomain.com',
    @FROM_NAME  = N'Joe Mailman',
    @TO         = N'MyFri***@HisDomain.com',
    @CC         = N'MyOtherFri***@HisDomain.com',
    @BCC        = N'MyEm***@MyDomain.com',

    @priority   = N'HIGH',
    @subject    = N'Hello SQL Server SMTP Mail',
    @message    = N'Goodbye MAPI, goodbye Outlook',
    @type       = N'text/plain',
    @attachments= N'c:\attachment1.txt;c:\attachment2.txt',
    @server     = N'mail.mydomain.com'
select RC = @rc

go



Like podria to send a mail to several directions?



A variable tries of the following way, declaring and enclosing some
post office but at the time of equaling the variable I had problems by
the comiles:



declare @mails varchar(800)
set @mails = 'jorgebarz***@gmail.com; locoba***@hotmail.com;
jzar***@hotmail.com,jgo***@molina.sbn.gob.pe'

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM      = N'lsantiste***@molina.sbn.gob.pe',
@FROM_NAME = N'LITMAN GAYITO',
@TO        = N'jbarz***@molina.sbn.gob.pe',
@CC        = N'@mails',  -- <<-- IGUALANDO VARIABLE
@BCC       = N'powerdevelo***@pilu.com',
@priority  = N'HIGH',
@subject   = N'MENSAJE DE PRUEBA',
@message   = N'HOLA MENSAJE DE PRUEBA',
@type      = N'text/plain',
@server    = N' mail.molina.sbn.gob.pe'

Soon it tries this way

@CC = @mails

Without using N' ' in this part of the code of above

@CC = N'@mails'

Using this I complete change sends the message very well to the
indicated post office but no longer the sent message is registered. The
user who control the message does not have in its registered mail the
sent message.

With example that gives the page of the DLL if it works, somebody
podria to help me.

Thank

Lima - Perú
Author
4 Aug 2006 10:02 PM
L.Barzi
They can help me please

Lima - Perú

Arnie Rowland ha escrito:

Show quote
> Darn Babelfish...
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
>
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
>
> "L.Barzi" <JorgeBarz***@gmail.com> wrote in message
> news:1154723725.467706.181560@h48g2000cwc.googlegroups.com...
> I use xpsmpt.dll works to me very well but my question is the following
> one:
>
> I use the following code to ejeutar Extended Stored Procedures of sgte
> way as it indicates the page http://www.sqldev.net/xp/xpsmtp.htm
>
> declare @rc int
> exec @rc = master.dbo.xp_smtp_sendmail
>     @FROM       = N'MyEm***@MyDomain.com',
>     @FROM_NAME  = N'Joe Mailman',
>     @TO         = N'MyFri***@HisDomain.com',
>     @CC         = N'MyOtherFri***@HisDomain.com',
>     @BCC        = N'MyEm***@MyDomain.com',
>
>     @priority   = N'HIGH',
>     @subject    = N'Hello SQL Server SMTP Mail',
>     @message    = N'Goodbye MAPI, goodbye Outlook',
>     @type       = N'text/plain',
>     @attachments= N'c:\attachment1.txt;c:\attachment2.txt',
>     @server     = N'mail.mydomain.com'
> select RC = @rc
>
> go
>
>
>
> Like podria to send a mail to several directions?
>
>
>
> A variable tries of the following way, declaring and enclosing some
> post office but at the time of equaling the variable I had problems by
> the comiles:
>
>
>
> declare @mails varchar(800)
> set @mails = 'jorgebarz***@gmail.com; locoba***@hotmail.com;
> jzar***@hotmail.com,jgo***@molina.sbn.gob.pe'
>
> declare @rc int
> exec @rc = master.dbo.xp_smtp_sendmail
> @FROM      = N'lsantiste***@molina.sbn.gob.pe',
> @FROM_NAME = N'LITMAN GAYITO',
> @TO        = N'jbarz***@molina.sbn.gob.pe',
> @CC        = N'@mails',  -- <<-- IGUALANDO VARIABLE
> @BCC       = N'powerdevelo***@pilu.com',
> @priority  = N'HIGH',
> @subject   = N'MENSAJE DE PRUEBA',
> @message   = N'HOLA MENSAJE DE PRUEBA',
> @type      = N'text/plain',
> @server    = N' mail.molina.sbn.gob.pe'
>
> Soon it tries this way
>
> @CC = @mails
>
> Without using N' ' in this part of the code of above
>
> @CC = N'@mails'
>
> Using this I complete change sends the message very well to the
> indicated post office but no longer the sent message is registered. The
> user who control the message does not have in its registered mail the
> sent message.
>
> With example that gives the page of the DLL if it works, somebody
> podria to help me.
>
> Thank
>
> Lima - Perú
Author
4 Aug 2006 10:19 PM
Arnie Rowland
Usted puede ser más acertado si usted crea a grupo de la distribución del
email y envía el email al grupo de la distribución.
También, noté que usted utiliza punto y coma y coma como separadores de
dirección.

Você pode ser mais bem sucedido se você criar um grupo da distribuição do
email e emitir o email ao grupo da distribuição.
Também, eu observei que você usa o semi-colon e a vírgula como separadores
de endereço.


You may be more successful if you create a email distribution group and send
the email to the distribution group. Also, I noticed that you use both
semi-colon and comma as address separators.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"L.Barzi" <JorgeBarz***@gmail.com> wrote in message
news:1154723725.467706.181560@h48g2000cwc.googlegroups.com...
I use xpsmpt.dll works to me very well but my question is the following
one:

I use the following code to ejeutar Extended Stored Procedures of sgte
way as it indicates the page http://www.sqldev.net/xp/xpsmtp.htm

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
    @FROM       = N'MyEm***@MyDomain.com',
    @FROM_NAME  = N'Joe Mailman',
    @TO         = N'MyFri***@HisDomain.com',
    @CC         = N'MyOtherFri***@HisDomain.com',
    @BCC        = N'MyEm***@MyDomain.com',

    @priority   = N'HIGH',
    @subject    = N'Hello SQL Server SMTP Mail',
    @message    = N'Goodbye MAPI, goodbye Outlook',
    @type       = N'text/plain',
    @attachments= N'c:\attachment1.txt;c:\attachment2.txt',
    @server     = N'mail.mydomain.com'
select RC = @rc

go



Like podria to send a mail to several directions?



A variable tries of the following way, declaring and enclosing some
post office but at the time of equaling the variable I had problems by
the comiles:



declare @mails varchar(800)
set @mails = 'jorgebarz***@gmail.com; locoba***@hotmail.com;
jzar***@hotmail.com,jgo***@molina.sbn.gob.pe'

declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM      = N'lsantiste***@molina.sbn.gob.pe',
@FROM_NAME = N'LITMAN GAYITO',
@TO        = N'jbarz***@molina.sbn.gob.pe',
@CC        = N'@mails',  -- <<-- IGUALANDO VARIABLE
@BCC       = N'powerdevelo***@pilu.com',
@priority  = N'HIGH',
@subject   = N'MENSAJE DE PRUEBA',
@message   = N'HOLA MENSAJE DE PRUEBA',
@type      = N'text/plain',
@server    = N' mail.molina.sbn.gob.pe'

Soon it tries this way

@CC = @mails

Without using N' ' in this part of the code of above

@CC = N'@mails'

Using this I complete change sends the message very well to the
indicated post office but no longer the sent message is registered. The
user who control the message does not have in its registered mail the
sent message.

With example that gives the page of the DLL if it works, somebody
podria to help me.

Thank

Lima - Perú

AddThis Social Bookmark Button