Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Mass Email: Text Body Keeps Looping In Each Email


First off, my server uses CDO, the updated version of CDONTS, to send mail.

The script works however, it sends the emails out and keeps looping the message body within the text of the email. here's an example:

I added fake users to my table called REALTORS.

this was the result of the email sent out:

<!-- START EMAIL MAIL OUT -->
I am an realtor in Florida and I found you from surfing around

Poop Title
http://www.poop.com

I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation.

If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp
Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot.

Best Regards,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around

Haha titleage
http://www.hahaha.com

I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation.

If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp
Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot.

Best Regards,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around

niclipse . com
http://www.niclipse.com

I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation.

If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp
Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot.

Best Regards,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) Area Code."I am an realtor in Florida and I found you from surfing around.

I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a "vote" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation.

If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories: http://www.realestate321.com/resources/resources.asp
Once added you will be placed in a "holding bin" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a "robot" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot.

Best Regards,

Nick McGirr
Real Estate Agent
http://www.realestate321.com/
"Buying and Selling Homes in the (321) Area Code."

<!--[==-- EMAIL MAIL OUT FINISHED ------->


ANY IDEAS ON HOW TO SEND EACH EMAIL TO EACH USER INDIVIDUALLY WHILE USING THE INFORMATION LINKED IN THE DATABASE WITHOUT LOOPING OTHER PEOPLE'S DB INFO IN THE SAME EMAIL?


Here's the script below....


<title>Email The List</title>

<%
nickemail = request.form("sender")
subject = request.form("subject")


If Len(subject) > 0 Then

dsn="Provider=SQLOLEDB;Data Source=sql.string.com, etc ect"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open dsn

Set RS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT title, url, email FROM Realtors"

RS.open SQL, conn


Do While NOT RS.eof

strTXT = strTXT & "I am an realtor in Florida and I found you from surfing around"

If Len(RS("title")) > 0 Then
strTXT = strTXT & vbcrlf & vbcrlf & RS("title") & vbcrlf
strTXT = strTXT & RS("url") & vbcrlf & vbcrlf

Else
strTXT = strTXT & "." & vbcrlf & vbcrlf
End If

strTXT = strTXT & "I have a real estate site and I am interested in exchanging links with your site. This is benefitial to you and I because each external website that links to your page counts as a ""vote"" for your website. The more links to your site, the better search engine placement you will recieve in google (it's called Google PageRank)...which ultimately means more exposure. It's a win/win situation." &vbcrlf &vbcrlf
strTXT = strTXT & "If you are interested, you may add your website to my link directory at the address below (it's all automated). Make sure to pick your correct category and sub-categories:" &vbcrlf
strTXT = strTXT & "http://www.realestate321.com/resources/resources.asp" & vbcrlf
strTXT = strTXT & "Once added you will be placed in a ""holding bin"" waiting to be approved. Your site will be approved when I find a link on your website to my website. My website will send out a ""robot"" once a month to make sure that my link is still on your site. If it's not understandably, your link will be removed from my page by that robot." & vbcrlf &vbcrlf

strTXT = strTXT & "Best Regards," & vbcrlf & vbcrlf
strTXT = strTXT & "Nick McGirr" & vbcrlf
strTXT = strTXT & "Real Estate Agent" & vbcrlf
strTXT = strTXT & "http://www.realestate321.com/" & vbcrlf
strTXT = strTXT & """Buying and Selling Homes in the (321) Area Code."""

set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")

' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
Flds.update

Set objMessage.Configuration = objConfig

objMessage.To = RS("email")
objMessage.From = nickemail
objMessage.Subject = subject

objMessage.TextBody = strTXT
'objMessage.HtmlBody = strHTML
objMessage.fields.update
objMessage.Send

RS.movenext

Loop


Conn.close
set Conn = nothing



set objMessage = nothing
set objConfig = nothing


ShowThanksMsg
Else

End If
ShowForm



Sub ShowForm
%>

<%
Session("department")="home"
%>


<center>
<form action=email.asp method=post>
<table border=0 cellpadding=4 cellspacing=2>

<table>
<tr><td><font class=tbody><b>From:</b></font></td><td><input type=text name=sender value="me@me.com"></td></tr>
<tr><td><font class=tbody><b>To:</b></font></td><td><font class=tbody>Brevard County Emails</font></td></tr>
<tr><td><font class=tbody><b>Subject:</b></font></td><td><input class=inputfield type=text name=subject size=22></td></tr>
<tr><td colspan=2><input type=image align=right src=/_images/submit.gif border=0 name=B1></td></tr>
</table>
</form></center>

<!-- <tr><td colspan=2><font class=tbody><b>Comments:</b></font><br><textarea class=inputfield rows=3 maxlength=100 name=message cols=40></textarea></td></tr> -->

<%
End Sub

Sub ShowThanksMsg()
response.write "<center><font size=5><b>Message Sent!</b></font><br><br>"
response.write "your message has been delivered to all members."

End Sub
%>




View Complete Forum Thread with Replies

Related Forum Messages:
Email Subscription - Plain Text Body
Hi,
 
I'm using a data-driven subscription to email reports. In one case, I need to email a report to an email-to-fax service. The fax service requires the email body ("Comment" in the subscription) to be in plain text, but it seems that the Reports Server formats it as HTML. Does anyone know how to change the way reporting services formats the emails?
 
Regards,
 
Greg McNamara

View Replies !
Mass Subscription Email Changes
 

The company i work for changed names and all email addresses within the company have changed.  While it was OK for a while they are no longer going to be forwarding email to the old addresses to the new ones.  There are Tons of subscriptions and tons of email addresses that need to be changed to the new names.
 
If i could find the table with the TO: part of the subscription held in it i could just run an update on that field and it would be solved...however, i cannot find that field...
 
 
So,
Without going into every subscription in report manager, how can i change the email addresses? Any Suggestions?
 
Thanks in advance

View Replies !
Using Variable Value In Email Body
Hello,

I have declared a variable in my SSIS package and got record count from myTable. Now I want to use this variable in email subject and email body.

Whereas when i use variable in email body then it result in variable value only ... i am unable to insert other text in it.

Please give some idea how to do it?

View Replies !
Placing A Web Link In An Email Body
I'm generating emails using sp_send_dbmail. Everything works perfectly except for one thing. In the body of the email I need to show a link to a web page (eg http://myweb/login.aspx).

The problem is that the received email shows the "link" as plain text, ie it is not a clickable link. I've tried adding char(13) (and char(10) and both) after the link text but that doesn't help.

Is there a way to make the link text a real link when received by Outlook? (All recipients will be using Outlook if that helps).

Thanks,

John

View Replies !
Load A Text File With Email Addresses And Compare Against A Database Table That Has Email Addresses And User_id
Hello ALL

 

what I want to achieve is to load a text file that has email addreses from disk and using the email addresses in the text file look it up against the email addresses in the database table then once matched delete all the users in the table whose email address were in the text file.

 

I also want to update some users using a different text file.

 

Please help me with the best way to do this

 

Thanks in advance

 

View Replies !
Insert Trigger Not Getting Row Data For Email Body
hello,
need help with a simple trigger i have been working on. the trigger automatically sends me an email out when a record is inserted, how ever i can't seem to get the row column data into the email. The part i do not understand is that I get the row column data  information in the email if I update the row.
This is for 2005 SQL
Any direction would be greatly appreaciated
OneIDesigned
 

View Replies !
Sp_send_cdosysmail - Parameter Inside Body Of Email
I currently have a web form posting back to a SQL table using a StoredProcedure. Part of this SP is that it pulls data from another tableand inserts a new row into the registration table.I want to have a trigger on the registration table that will fire whenthe row is inserted which will use the sp_send_cdosysmail sproc to sendan e-mail to the user.However, I want to be able to include the value of one of the fieldswithin the BODY of the message. I can't find a way to includeparameters/variables within the Body of a message usingsp_send_cdosysmail and it's driving me nuts.Here's what I have in a sproc (not a trigger) that executessp_send_cdosysmail...I currently pass a parameter for the "To" e-mailaddress and that works fine._________________________________________________EXEC sp_send_cdosysmail'fromemailaddress@testcompany.com',@stremail, <--This is the Parameter passed for the "To" e-mail addy-->'Test Subject','Test Body,Additional TextAdditional Text<--THIS IS WHERE I WANT TO PUT THE PARAMETER-->Additional TextAdditional Text'__________________________________________________ _Is there any way to do this?The sp_send_cdosysmail I used is the standard MS one..Here it is forreference:Thanks for any help offered!ElliotCREATE PROCEDURE [dbo].[sp_send_cdosysmail]@From varchar(100) ,@To varchar(100) ,@Subject varchar(100)=" ",@Body varchar(4000)/************************************************** *******************This stored procedure takes the parameters and sends an e-mail.All the mail configurations are hard-coded in the stored procedure.Comments are added to the stored procedure where necessary.References to the CDOSYS objects are at the following MSDN Web site:http://msdn.microsoft.com/library/d...s_messaging.asp************************************************** *********************/ASDeclare @iMsg intDeclare @hr intDeclare @source varchar(255)Declare @description varchar(500)Declare @output varchar(1000)--************* Create the CDO.Message Object ************************EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT--***************Configuring the Message Object ******************-- This is to configure a remote SMTP server.--http://msdn.microsoft.com/library/d...n_sendusing.aspEXEC @hr = sp_OASetProperty @iMsg,'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value','1'-- This is to configure the Server Name or IP address.-- Replace MailServerName by the name or IP of your SMTP Server.EXEC @hr = sp_OASetProperty @iMsg,'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value','SMTPServer'-- Save the configurations to the message object.EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null-- Set the e-mail parameters.EXEC @hr = sp_OASetProperty @iMsg, 'To', @ToEXEC @hr = sp_OASetProperty @iMsg, 'From', @FromEXEC @hr = sp_OASetProperty @iMsg, 'Subject', @Subject-- If you are using HTML e-mail, use 'HTMLBody' instead of 'TextBody'.EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @BodyEXEC @hr = sp_OAMethod @iMsg, 'Send', NULL-- Sample error handling.IF @hr <>0select @hrBEGINEXEC @hr = sp_OAGetErrorInfo NULL, @source OUT, @description OUTIF @hr = 0BEGINSELECT @output = ' Source: ' + @sourcePRINT @outputSELECT @output = ' Description: ' + @descriptionPRINT @outputENDELSEBEGINPRINT ' sp_OAGetErrorInfo failed.'RETURNENDEND-- Do some error handling after each step if you have to.-- Clean up the objects created.EXEC @hr = sp_OADestroy @iMsgGO

View Replies !
Query Results Listed In Email Body
I currently have an SP that emails a fixed paragraph in the body and an attachment with query results.

Instead of having an attachment, can I have the query results listed in the email BODY after the paragraph?

Is it easier to do as text or an HTML grid?

Any help would be greatly appreciated. Thanks,
Eric

View Replies !
Sending Email From An HTML Template As The Body
We have a DTS package that sends smtp email from an ActiveX script task.  The body of the emails are in template files that we read in and then replace values relating to the customer.

I am looking for suggestions of handling this process from an SSIS package.  This is what our existing code does.

 

'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************

Function Main()
 '********************************************************************************************
 '  Email results
 '********************************************************************************************
 Dim oRS, objMessage, fTemplate

 Set fso = CreateObject("Scripting.FileSystemObject")

 Set oRS =DTSGlobalVariables("ToBeNotified").Value
 oRS.MoveFirst

 Do While NOT oRS.EOF
  Set objMessage = CreateObject("CDO.Message")
  Set objMessage2 = CreateObject("CDO.Message")

  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  
  'Name or IP of Remote SMTP Server
  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = DTSGlobalVariables("RemoteSMTPServer").Value
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = DTSGlobalVariables("RemoteSMTPServer").Value
  
  'Server port (typically 25)
  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

  'Type of authentication, NONE, Basic (Base64 encoded), NTLM
  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  
  'Your UserID on the SMTP server
  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "CustomerService"
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "CustomerService"
  
  'Your password on the SMTP server
  objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "cslogin"
  objMessage2.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "cspassword"

  objMessage.Configuration.Fields.Update
  objMessage2.Configuration.Fields.Update
 
  objMessage.Sender = DTSGlobalVariables("EmailFrom").Value
  objMessage2.Sender = DTSGlobalVariables("EmailFrom").Value

  objMessage.From = DTSGlobalVariables("EmailFrom").Value
  objMessage2.From = DTSGlobalVariables("EmailFrom").Value

  objMessage.To = oRS.Fields("ContactEmail").value
'  objMessage.To = "me@ourmail.com"

  objMessage2.To = DTSGlobalVariables("EmailBCC").Value
'  objMessage2.To = "me@ourmail.com"


  If oRS.Fields("Rejected").value = 1 Then
   'Rejection Message
   objMessage.Subject = "electronic request notification"

   If oRS.Fields("ProductType").value = "Fixed" Then
    Set htmlTextStream = fso.OpenTextFile (DTSGlobalVariables("EmailTemplateRejectedFixed").Value)
   Else
    Set htmlTextStream = fso.OpenTextFile (DTSGlobalVariables("EmailTemplateRejectedVariable").Value)
   End If

  Else
   'Successful results
   objMessage.Subject = "electronic confirmation #" + CSTR(oRS.Fields("ConfirmationId").value)
   objMessage2.Subject = "Customer request for hard copy of contract"

   'Add Terms and Conditons document
   termDocument = DTSGlobalVariables("TermDocumentsRepository").Value +  CSTR(oRS.Fields("TermDocument").Value) + ".pdf"
   
   If fso.FileExists(termDocument) Then
    objMessage.AddAttachment termDocument
    objMessage2.AddAttachment termDocument
   End If

   If oRS.Fields("ProductType").value = "Fixed" Then
    Set htmlTextStream = fso.OpenTextFile (DTSGlobalVariables("EmailTemplateSuccessFixed").Value)
   Else
    Set htmlTextStream = fso.OpenTextFile (DTSGlobalVariables("EmailTemplateSuccessVariable").Value)
   End If

  End If

  htmlText = htmlTextStream.ReadAll
  htmlText = Replace( htmlText , "[OurLogo]" , DTSGlobalVariables("EmailLogo").Value)
  htmlText = Replace( htmlText , "[CustomerName]" , oRS.Fields("ContactFirstName").value + " " + oRS.Fields("ContactLastName").value)

  If oRS.Fields("Rejected").value = 0 Then
   htmlText = Replace( htmlText , "[ConfirmNumber]" , oRS.Fields("ConfirmationId").value)
   htmlText = Replace( htmlText , "[OrderDate]" , oRS.Fields("SalesDate").value)
   htmlText = Replace( htmlText , "[ProductName]" , oRS.Fields("ProductType").value)
   htmlText = Replace( htmlText , "[Months]" , oRS.Fields("TermMonths").value)
   htmlText = Replace( htmlText , "[Price]" , oRS.Fields("SalesPrice").value)
   htmlText = Replace( htmlText , "[Units]" , oRS.Fields("SalesPriceUnit").value)
   htmlText = Replace( htmlText , "[StartDate]" , oRS.Fields("FlowStartDate").value)
   htmlText = Replace( htmlText , "[AccountNumber]" , oRS.Fields("AccountNumber").value)
  End If

  objMessage.HTMLBody = htmlText
  objMessage2.HTMLBody = htmlText
  

  objMessage.Send


  If oRS.Fields("SendHardCopy").value = True AND  oRS.Fields("Rejected").value = 0 Then

   ' Attach Instructions for Hard Copy delivery
   instructionDocument = DTSGlobalVariables("TermDocumentsRepository").Value + "Instructions.txt"

   set file = fso.CreateTextFile(instructionDocument, true)
   file.WriteLine("The customer has requested a hard copy of their contract to be sent to them.")
   file.WriteLine("")
   file.WriteLine("Instructions:")
   file.WriteLine("1) Print the email")
   file.WriteLine("2) Print the attached Terms & Conditions document")
   file.WriteLine("3) Mail both items to the address below")
   file.WriteLine("")
   file.WriteLine("Customer Address:")
   file.WriteLine(oRS.Fields("ContactFirstName").value + " " + oRS.Fields("ContactLastName").value)
   file.WriteLine(oRS.Fields("BillingAddress1").value)
   If oRS.Fields("BillingAddress2").value <> "" Then
    file.WriteLine(oRS.Fields("BillingAddress2").value)
   End If
   file.WriteLine(oRS.Fields("BillingCity").value + ", " + oRS.Fields("BillingState").value + "  " +oRS.Fields("BillingZip").value)
   file.Close
   set file=nothing

   objMessage2.AddAttachment instructionDocument

   fso.DeleteFile(instructionDocument)

   objMessage2.Send
  End If  

  set objMessage = nothing
  set objMessage2 = nothing

  oRS.MoveNext
 Loop
 
 Main = DTSTaskExecResult_Success
End Function

All suggestions are appreciated.

SK

View Replies !
Email Body Was Truncated In Tcp Layer In Sp_send_dbmail
 

I sent email from sp_send_dbmail in html format.
when i checked it in outlook, each piece was corrupted at 1000 bytes, the totalbytes in my email is 2600 bytes,it was corrupted twice. it looks like below:
<table>
<tr><td>Customer</
John Smith<td></tr>
</table>
 
I believe Sql server SMTP mail server sent the email body in 1000 bytes each TCP conversion.
 
Is any way I can change the TCP setting for SQL server SMTP mail engine.
 
Thanks,
 
 

View Replies !
SSIS Send Email Html Body
Hi, I need help please.

I want to send an HTML Email

I have an Htm file that i want to use as my email body on Send Mail Task
MessageSourceType: File Connection
MessageSource: Email.htm

It sends the email with the file in the body but not in HTML format
it outputs the HTML tags + data
eg: <span style="font-size:9.0pt;">Period: 2008.04</span>

I used the same file in a DTS package & that works fine.

Please Assist!

Regards

View Replies !
Sending File Contents In The Body Of The Email With Xp_sendmail
I would like to send the contents of a file using xp_sendmail howeverI do not want the file contents to be an attachment.I have no problem sending the file as an attachement.Can anybody give me an xp_sendmail example of how to do this.The results of a query can easily appear in the body of the email butall myattempts to include the contents of a file in the body of the emailhave not worked.TIA

View Replies !
How To Send Sql/stored Procedure Output In The Body Of The Email.
Everyday morning I email the sql query/stored procedure output results to the users, I was wondering if I can use some kind of t-sql code or DTS packages so that I can automate this process where I want to send the sql/stored proc results in the body of the email. 

View Replies !
How To Incorporate A Table Field Into The Email Message Body Nto As An Attachment?
Hello everyone,

Please i need your help...

I dont know how to place the field 'strTitle and datBorrowed " in my email? Not as an attachment though....Just write it in the mail as part of message body...

I use this SQL select statement to retrieve the strTitle and datBorrowed fields

strSQL += @"Select replace(strtitle,'[Original Book] - ',''), datBorrowed from tblBooks where convert(varchar(10),datBorrowed,101) = convert(varchar(10),(getdate() - 1),101) ORDER BY strTitle asc";


Now, I have the following code to write the email

static void SendTest()
{

int iEmailLanguage = 0;
MailMessage objMail;
objMail = new MailMessage();
objMail.From = MAIL_FROM;
objMail.To =MAIL_TO;
objMail.Subject = "Books Borrowed Yesterday";
objMail.Body = Dict.GetVal(iEmailLanguage, "EMAIL_MESSAGE");
objMail.Attachments.Add(new MailAttachment(strAttachment));
SmtpMail.SmtpServer = SSMTP_SERVER;
SmtpMail.Send(objMail);
}


And the body of the email is this......


Dict.AddVal(0, "EMAIL_MESSAGE", "*** This e-mail is automatically generated. ***" +
"*** PLEASE DO NOT REPLY TO THIS E-MAIL. ***" +
"" +
"Books Borrowed Yesterday are:" +

"" +
"" +
"Thank you," +
"" +
"eLibrarian" +
"" +
"================================================== ===============" +
"" +
"This e-mail is automatically generated by the Library system." +
"Please do not reply.");



i need to put or wedge the data i got from the SQL Statement into this or after the line "Books Borrowed Yesterday are:" +

So how should i do this?

View Replies !
Dbmail Doesn't Rely On IIS SMTP, How To Set Bounced Email Redirect Email Etc.? Thanks
Under IIS SMTP I can set bounced email redirect etc. how to do that with dbmail, the idea is I can get the list of bounced emails somewhere so I can create a report.

 

Any idea?

 

thanks

View Replies !
Help Split List Of Email Add Comma For Evry Email
need help
split list of email add comma for evry email
i have tabe "tblLogin" and in this table i have field emall
like this
 
emall    
-----------------------------------------
aaa@hhhh.mm
nnn@hhhh.mm
mmm@hhhh.mm
 
need to do  ilke this



Code Snippet
@list_email = (SELECT     emall  FROM         tblLogin)
 
--------------------------i get this
-----------------------@list_email=aaa@hhhh.mm ; nnn@hhhh.mm ; mmm@hhhh.mm
 
@recipients = @list_email
 
 


 
 
 



Code Snippet

IF EXISTS( SELECT * FROM [db_all].[dbo].[taliB] )

 

BEGIN

DECLARE @xml NVARCHAR(MAX)DECLARE @body NVARCHAR(MAX)

SET @xml =CAST(( SELECT

FirstName AS 'td','',

LastName AS 'td','' ,

Date_born AS 'td','' ,

Age AS 'td','' ,

BirthdayToday AS 'td','' ,

BirthdayThisWeek AS 'td'

FROM [Bakra_all].[dbo].[taliB] ORDER BY LastName FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))

SET @body ='<html><H1 align=center>aaaaaaaaaaaaaaaaaaaaaa</H1><body ><table border = 1 align=center dir=rtl>

<tr>

<td>name</td>

<td>fname</td>

<td>date</td>

<td>age</td>

<td>aaaaaaaaa</td>

<td>bbbbbbbbbbbbbbb</td>

</tr>'

SET @body = @body + @xml +'</table></body></html>'

EXEC msdb.dbo.sp_send_dbmail

@recipients =N'rrr@iec.co.il',

@copy_recipients='rrrrr@iec.co.il',

@body = @body,

@body_format ='HTML',

@subject ='ggggggggggggggggggggg',

@profile_name ='ilan'

END

ELSE

print 'no email today'
 

View Replies !
Nvarchar Column Text As Email Unicode Content
Hi,
i have a table with a nvarchar column,i want to send this column value as unicode content to customer mail box , but when i send it a mail with '?' customer receive , how can i accomplish this?
thanks

View Replies !
Email
Quick question ..does DatabaseMail work in sql server express 2008.And if not ... is there a simple work around / solution to get thesame effect .. ie to send email out from sql expressRegardsRob

View Replies !
SQL Email
I want to write a stored procedure that will email Sales Associates and notify them if a customer has had a return number issed for return of defective product. I wanted to do this daily. I am using SQL Server 2000. Is there a way to get SQL to send an email without using Microsoft Exchange? I have a network that is using Workgroup mode and not domains. I can provide SQL a mailbox on our Linux mail server to send the mail.

View Replies !
Email
Hi all me again I gotta question, the Sr executive asst has a number of reports that gets emailed to different department, only problem is those departments are on a totally different server. I am guessing that we need to start SQL AGENT Emailing MAPI to do this for us, of course I could be wrong. This is one of the stored procedures that creates one of the reports

CREATE PROCEDURE createSecurityListtobeEmailed
AS
SELECT SecurityListX."Last Name", SecurityListX."First Name", SecurityListX.MI, SecurityListX.Sex, SecurityListX.DOB, SecurityListX.IR#, SecurityListX."Issue Date", SecurityListX."Date served", SecurityListX.Duration, SecurityListX."Exp Date", SecurityListX."Reason for Exclusion", SecurityListX."Added Comment", SecurityListX.type INTO SecurityList
FROM SecurityListX
GROUP BY SecurityListX."Last Name", SecurityListX."First Name", SecurityListX.MI, SecurityListX.Sex, SecurityListX.DOB, SecurityListX.IR#, SecurityListX."Issue Date", SecurityListX."Date served", SecurityListX.Duration, SecurityListX."Exp Date", SecurityListX."Reason for Exclusion", SecurityListX."Added Comment", SecurityListX.type
HAVING (((SecurityListX."Last Name") Is Not Null))
GO

View Replies !
Email Through SQL
I am trying to setup my sql to send automatic emails to different companies but I am not doing so well. The user puts an email address in the database and then presses a button (command button) that will execute a stored procedure xp_sendmail to a recepient. I need to know how to include read receipts and delivery receipts into the stored procedure, because right now its set up in his outlook as a rule to do this and I want to set it up in sql. The user deals with companies and these companies have several contacts with several email addresses which sql will store in a seperate table.

View Replies !
Email
How can I implement the functionality of sending mail with the help of SP or DTS?
Subhasish

View Replies !
Sql Email
I have created a dts email task to attach an externally created file.
Outlook is installed on the local server which we use to process email. The problem is that email messages appear in the sent items folder in outlook as unsent items (Envelope Closed icon) If i manually forward the email under outlook everything works fine.

Any Ideas

Sql 2000 sp4
Outlook 2000

Thanks in advance

Mike Osbourn

View Replies !
Email From A Job
Trying to get a job step to send an email with an explaination in certain failure conditions. The problem is I want the recipient to be the job's operator.
don't know of a way to accesss the job's operator email address cleanly from inside a step

Any ideas?

View Replies !
Email
HI,
I have sucessfully setup email on SQL 2000 using Exchange. It works fine with
xp_sendmail but when I test the email account on operator it tells me that
the mail was sent successfully but I never get the email?

Help??

Thanks!!

View Replies !
DTS- Email How TO
IF I HAVE ONE OR MANY PACKAGES HOW DO SEND AN EMAIL TO MY BOSS IF IT BLOWS UP?? ex. INPUT IS MY TRUNCATE STEP, CONNECTION 1 IS MY ODBC, CONECTION 2 IS WHERE THE RESULT WILL BE PLACED INTO. AT ANY ONE OF THOSE STEPS, It BLOWS HOW TO SEND AN EMAIL. THE EMAIL IS ALREADY SETUP BECAUSE I TESTED IT IN THE QUERY ANALYZER WITH THIS STATEMENT ( EXEC xp_sendmail @recipients = 'robertk;laurac',
@message = 'The master database is full.',
@copy_recipients = 'anned;michaels',
@subject = 'Master Database Status') AND IT WORKS.

View Replies !
Email From SQL
How do i get the email to be send automatically from SQL

My SQL Server is configured so if sends an email after running a job. The email is been succesfully sent by SQL, but is not atually sent until you login and start up Microsoft Outlook and client on Send and Receive.

Surely there is a way to get SQL to automatically send the message.

I have got outlook to send message immeditally.

My mail server is SendMail - SCO Open Server 5.06

Thanks

David

View Replies !
SQL Email
I've setting up SQL email for alerts and I've got Outlook Express working
with our SMTP server. But when I try testing email to an operator, I'm getting a
"Error 22022: SqlServerAgen Error: The SQLServerAgent mail session is not
running, check the mail profile and/or the SQLServerAgent service startup
account in the SQLServerAgent Properties dialog."

I checked the archives of this list and found an identical discussion, but
the person said to check the properties of SQL Server Agent and then
look at Mail. Is there supposed to be a Mail tab or is it the "Mail Session"
box under the General tab (where I have the Mail Profile name).

Thanks for any help.

Ed

View Replies !
SQL - Email
Is there a way SQL server to email/send a query results to a user ?

Thanks in advance.

Ivan

View Replies !
Email
EXEC master.dbo.xp_sendmail
@recipients=N'myemailaddress@somewhere.com',
@message=N'job failed.' ;

Do you know why the following error is produced?
xp_sendmail: Procedure expects parameter @user, which was not supplied.

Thanks

View Replies !
Email Not Being Sent...
I was attempting to send an e-mail from a package and it was not working correctly when I deployed to the remote DB server. I would simply get the "Failed sending mail" message.

I was setting the SmtpServer property of the connection through a configuration file to the remote SMTP server IP address (was 127.0.0.1 for development).

It turned out that the configuration setting was applied to the SMTP Connection Manager and the connection string would return the changed IP address BUT it was still connecting to the development 127.0.0.1 IP address. Once I changed the configuration property to be the connection string that was configured it functioned just fine.

I will be logging this as a bug with MS but thought people might want to know about this...

Fred

View Replies !
Email
I would like to automate a report to be emailed to an email address.
When viewing the report, clicked on new subscription.
In the subscription window what options should there be for Delievered By: ?
I currently have: Report Server File Share in the drop down. Should there be other entries in the list too?
Thanks

View Replies !
ERD Of An Email App
Hi, I've been asked to create a small application to send and receive emails with basic functionality like reply and forward
messages. All of them will be stored in a sql database.
I am mainly a programmer so I would like to know if you have any sample ERD I can use as a reference
or if you can help me define the entities, I am not sure how I need to handle the "replied messages" and "Forwarded messages"


Any help will be appreciated.

Armando.

View Replies !
Sql &#043; Email
Hello everyone

I am working on a little project for work which get the relvant data every 2mins and puts the data into a Data Grid in ASP.net 2.0

Now my SQL scipt runs every 2min and i need to know if at a certain time i could tell the SQL script to run the report and email me the results???

any help would be great

thanks alistair

View Replies !
DTS And Email
Hi all,

I am using SQL 2000 and i have DTS packages that are used to trasfer data from a datasource to SQL server. i want to set up the packges so i get an email for every step that failes, so i use on failure send email for each step. the question is what do i use to send the email, i know DTS has a MailTask but is this the only option and how is that different from XP_sendmail??

Appreciate any help
thanks

View Replies !
Email From Ftp
I have tried a few different stored procedures but i'm looking for away to send email from a server that does not have email enabled. (I want to pass in the smtp server and email and password.

Does anyone know of any script?

View Replies !
INNER Join On Email
I have two tables both have email address in them
I want to have a datagrid that shows which email addresses are in Table A (NZ) but not in B (Members)
Here is the Code but it doesn't work
SelectCommand="SELECT Members.Company,Members.UserEmail, NZ.F1UserEmail, NZ.StaffID FROM Members INNER JOIN NZ ON NZ.F1UserEmail <> Members.UserEmail WHERE (([Company] = @Company) OR ([Company] = @Company2)) ">
Any ideas would be appreciated

View Replies !
Distinct Name And Email.
hey guys
.
you see how fenix.sn has a couple of entries BUT the same email and DIFFErENT BET IDS.
okay this is what i wanna do.
i wanna send an email to fenix.sn (just ONE email) saying you have won the following bets: xxx, xxx, xxx, xxx
then i wanna delete the entreis from the table.
 

View Replies !
Email Error
the site i am working on is www.papertrailinvites.com
on the left when you enter your email address and hit submit i get this error:

Server Error in '/' Application.


Must declare the scalar variable "@Email".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@Email".Source Error:



Line 29:
Line 30: conn.Open();
Line 31: cmd.ExecuteNonQuery();
Line 32:
Line 33: }
My code is below: protected void Button1_Click(object sender, EventArgs e)
{
using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["cardsConnectionString1"].ConnectionString)) {

string email = Newsletter_Email.Text;

SqlCommand cmd = new SqlCommand("INSERT INTO Email (EmailAddress) Values (@Email)", conn);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@Name", email);

conn.Open();
cmd.ExecuteNonQuery();

}
}
 

View Replies !
Select_identity() Sent Through Email...
Ok i'm new to asp but familiar with other server side scripting languages. I'm writing a simple query to insert data into a table, then i want to be able to email someone saying data has been inserted. The problem I am having is i want to be able to add a link to go straight to the page that shows the information of the inserted data. so i figure a .asp?id=????  I have researched select_identity() for this method, but am unable to figure out exactly how I am supposed to code this. Any help or alternative methods would be appreciated. Thanks.

View Replies !
Send Email Through SQL
Hi all, can i send an email through SQL? i don't want to use third party software. Also, i can't configure the customer's db server. It is possible to send an email without much configuration. If configuration needed, is it possible to configure through SQL script? thx 

View Replies !
Email Trigger
Hello
Can you setup a trigger to mail some one when a record is updated in SQL server 2005?
If you can, can anyone help me?
C

View Replies !
Email Alert
I'm trying to develop a email alert feature on my project. I was trying to approach with SQL trigger wich I think is the best option. Basically, when a new record is inserted into ad table, a email alert goes to peolpe who selected to receive alert wehen certain conditions are met. What would be the best approach? any examples?Thanks

View Replies !
Sending SQL Email
I have developed a B2B Application which is successfully running, now the problem is that my client says that he need a process which sends report of total orders on daily bases.
 
I am using SQL Server and think that SQL Mail is a good idea, I can find many articles about which needs Outlook for that which is much difficult on the web server. Remember I need to send email only not to receive.
 
Thanks, any reply will be highly appreciated.
 

View Replies !
Auto Email
Hi All,
I want to write a console application to send email. There is a Date field in the SQL Server and I need to send email 2 weeks before that date.I have no idea how to write a console application and make it work.Does anybody have code for this? If so please post it.
Thanks a lot,
Kumar.

View Replies !
Email On Insert
Hi all,I wanted sql server to shoot an email upon insert into a table. I treated atrigger on that table as below.CREATE TRIGGER [emailoninsert] ON [dbo].[table_name]FOR INSERTASexec sp_sendSMTPmail 'user@user.com', 'New records are inserted intable_name table', 'Please investigate and take necessary actions.',@cc='', @BCC = '',@Importance=1,@Attachments='', @HTMLFormat = 0,@From ='notification@sqlserver.com'Is this solution a good method?Thanks,Guju

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved