Home All Groups Group Topic Archive Search About

xp_smtp_sendmail send out corrupted email message for large attach

Author
7 Sep 2006 9:09 PM
BF
I use the following way to send out email message from my stored procedure:

EXEC master.dbo.xp_smtp_sendmail
        @FROM        = 'a**@bbb.ca'
    ,    @TO          = 'a**@bbb.ca'
    ,    @subject     = 'test message'
    ,    @type        = N'text/plain'
    ,    @server      = 'SQLEMAIL.bbb.ca'
    ,    @attachment  = 'c:\temp\SQLOut.txt'
    ,    @port        = 25
    ,    @message     = N'File limit of 64KB exceeded. Open the attached file to
get the data.'


But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
got corrupted message from my outlook client. And the attachment file size
changed from 10BM to 13MB.
If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
out the message, I always get the correct message and the attachment is 10MB.
So our exchange server is able to handle 10MB attachment files.

Does anybody know why xp_smtp_sendmail sends out corrupted email message for
large attachments?

Thanks a lot.

Author
7 Sep 2006 9:17 PM
SQL Menace
Since this is a 3rd party component you should contact
them-->http://www.sqldev.net/about.htm

Denis the SQL Menace
http://sqlservercode.blogspot.com/

BF wrote:
Show quote
> I use the following way to send out email message from my stored procedure:
>
> EXEC master.dbo.xp_smtp_sendmail
>         @FROM        = 'a**@bbb.ca'
>     ,    @TO          = 'a**@bbb.ca'
>     ,    @subject     = 'test message'
>     ,    @type        = N'text/plain'
>     ,    @server      = 'SQLEMAIL.bbb.ca'
>     ,    @attachment  = 'c:\temp\SQLOut.txt'
>     ,    @port        = 25
>     ,    @message     = N'File limit of 64KB exceeded. Open the attached file to
> get the data.'
>
>
> But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
> got corrupted message from my outlook client. And the attachment file size
> changed from 10BM to 13MB.
> If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
> out the message, I always get the correct message and the attachment is 10MB.
> So our exchange server is able to handle 10MB attachment files.
>
> Does anybody know why xp_smtp_sendmail sends out corrupted email message for
> large attachments?
>
> Thanks a lot.
Author
7 Sep 2006 9:18 PM
Aaron Bertrand [SQL Server MVP]
Is it possible that sometimes SQLOut.txt is a unicode file?



Show quote
"BF" <B*@discussions.microsoft.com> wrote in message
news:3BCA3F16-2483-4B99-9762-E0CA08F87C7A@microsoft.com...
>I use the following way to send out email message from my stored procedure:
>
> EXEC master.dbo.xp_smtp_sendmail
> @FROM        = 'a**@bbb.ca'
> , @TO          = 'a**@bbb.ca'
> , @subject     = 'test message'
> , @type        = N'text/plain'
> , @server      = 'SQLEMAIL.bbb.ca'
> , @attachment  = 'c:\temp\SQLOut.txt'
> , @port        = 25
> , @message     = N'File limit of 64KB exceeded. Open the attached file to
> get the data.'
>
>
> But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
> got corrupted message from my outlook client. And the attachment file size
> changed from 10BM to 13MB.
> If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
> out the message, I always get the correct message and the attachment is
> 10MB.
> So our exchange server is able to handle 10MB attachment files.
>
> Does anybody know why xp_smtp_sendmail sends out corrupted email message
> for
> large attachments?
>
> Thanks a lot.
>
>
Author
7 Sep 2006 10:17 PM
BF
SQLOut.txt is a plain text file. It is not a unicode file.


Show quote
"Aaron Bertrand [SQL Server MVP]" wrote:

> Is it possible that sometimes SQLOut.txt is a unicode file?
>
>
>
> "BF" <B*@discussions.microsoft.com> wrote in message
> news:3BCA3F16-2483-4B99-9762-E0CA08F87C7A@microsoft.com...
> >I use the following way to send out email message from my stored procedure:
> >
> > EXEC master.dbo.xp_smtp_sendmail
> > @FROM        = 'a**@bbb.ca'
> > , @TO          = 'a**@bbb.ca'
> > , @subject     = 'test message'
> > , @type        = N'text/plain'
> > , @server      = 'SQLEMAIL.bbb.ca'
> > , @attachment  = 'c:\temp\SQLOut.txt'
> > , @port        = 25
> > , @message     = N'File limit of 64KB exceeded. Open the attached file to
> > get the data.'
> >
> >
> > But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
> > got corrupted message from my outlook client. And the attachment file size
> > changed from 10BM to 13MB.
> > If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
> > out the message, I always get the correct message and the attachment is
> > 10MB.
> > So our exchange server is able to handle 10MB attachment files.
> >
> > Does anybody know why xp_smtp_sendmail sends out corrupted email message
> > for
> > large attachments?
> >
> > Thanks a lot.
> >
> >
>
>
>
Author
12 Sep 2006 3:33 AM
Gert E.R. Drapers
Is the file you are attaching opened by other users/processes or is it
really closed?
Ge***@SQLDev.Net

Show quote
"BF" <B*@discussions.microsoft.com> wrote in message
news:3BCA3F16-2483-4B99-9762-E0CA08F87C7A@microsoft.com...
>I use the following way to send out email message from my stored procedure:
>
> EXEC master.dbo.xp_smtp_sendmail
> @FROM        = 'a**@bbb.ca'
> , @TO          = 'a**@bbb.ca'
> , @subject     = 'test message'
> , @type        = N'text/plain'
> , @server      = 'SQLEMAIL.bbb.ca'
> , @attachment  = 'c:\temp\SQLOut.txt'
> , @port        = 25
> , @message     = N'File limit of 64KB exceeded. Open the attached file to
> get the data.'
>
>
> But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
> got corrupted message from my outlook client. And the attachment file size
> changed from 10BM to 13MB.
> If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
> out the message, I always get the correct message and the attachment is
> 10MB.
> So our exchange server is able to handle 10MB attachment files.
>
> Does anybody know why xp_smtp_sendmail sends out corrupted email message
> for
> large attachments?
>
> Thanks a lot.
>
>
Author
12 Sep 2006 2:35 PM
BF
The file is closed already.

In my stored procedure, I create this file in temp folder first. Then I
email it out. Then I delete this file.

If the file size is small, say less than 5MB, then I don't have any issues
sending this file out.


Show quote
"Gert E.R. Drapers" wrote:

> Is the file you are attaching opened by other users/processes or is it
> really closed?
> Ge***@SQLDev.Net
>
> "BF" <B*@discussions.microsoft.com> wrote in message
> news:3BCA3F16-2483-4B99-9762-E0CA08F87C7A@microsoft.com...
> >I use the following way to send out email message from my stored procedure:
> >
> > EXEC master.dbo.xp_smtp_sendmail
> > @FROM        = 'a**@bbb.ca'
> > , @TO          = 'a**@bbb.ca'
> > , @subject     = 'test message'
> > , @type        = N'text/plain'
> > , @server      = 'SQLEMAIL.bbb.ca'
> > , @attachment  = 'c:\temp\SQLOut.txt'
> > , @port        = 25
> > , @message     = N'File limit of 64KB exceeded. Open the attached file to
> > get the data.'
> >
> >
> > But when attachment file 'c:\temp\SQLOut.txt' is 10MB. Half of the time I
> > got corrupted message from my outlook client. And the attachment file size
> > changed from 10BM to 13MB.
> > If I use outlook client to attach 'c:\temp\SQLOut.txt' manually then send
> > out the message, I always get the correct message and the attachment is
> > 10MB.
> > So our exchange server is able to handle 10MB attachment files.
> >
> > Does anybody know why xp_smtp_sendmail sends out corrupted email message
> > for
> > large attachments?
> >
> > Thanks a lot.
> >
> >
>
>
>

AddThis Social Bookmark Button