no_and_fo


Hi all:


I had created the notification services in my  server ,but when I add the subscribers and the subscriptions successfully,it can't send email.The most important is there is no any error to indicate me how to do it .
The configuration of the SMTP protocol in the ADF is as following

    <Protocol>
     <ProtocolName>SMTP</ProtocolName>
     <Fields>
      <Field>
       <FieldName>Subject</FieldName>
       <SqlExpression>'Flight notification: '+CONVERT (NVARCHAR(30), GETDATE())</SqlExpression>
      </Field>
      <Field>
       <FieldName>BodyFormat</FieldName>
       <SqlExpression>'html'</SqlExpression>
      </Field>
      <Field>
       <FieldName>From</FieldName>
       <SqlExpression>'XXXX@XX.XXX'</SqlExpression>
      </Field>
      <Field>
       <FieldName>Priority</FieldName>
       <SqlExpression>'Normal'</SqlExpression>
      </Field>
      <Field>
       <FieldName>To</FieldName>
       <SqlExpression>'myDevice'</SqlExpression>
      </Field>
     </Fields>
    </Protocol>
   </Protocols>

and the configuration of the delivery channel in the ICF is aas following

  <DeliveryChannel>
   <DeliveryChannelName>EmailChannel</DeliveryChannelName>
   <ProtocolName>SMTP</ProtocolName>
   <Arguments>
       <Argument>
           <Name>smtpserver</Name>
           <Value>myservername</Value>
       </Argument>
   </Arguments>
  </DeliveryChannel>
 </DeliveryChannels>

Whether I miss some important thing to do this

I need your help ,Thanks a lot .





Re: the error of the SMTP in Sql Server 2005 notification services

Joe Webb


Have you checked in the Windows Event Log using Event Viewer

You can turn on Verbose logging by editing the config file in the NS folder.

HTH...

Joe







Re: the error of the SMTP in Sql Server 2005 notification services

no_and_fo

Hi Joe
Yes,I have checked in the Windows Event Log using Event Viewer,but it isn't any error indicate about the aspect of the SMTP delivery protocol and also the notification.
When I send notification using my custom-written delivery protocol, the
DeliveryStatusDescription column of view mentioned above shows entry
as "Delivery Failed",and the DeliveryStatusInfo column of view mentioned "The email address or SMTP server value invalidates" ,So that I don't recive the notification of email. If I send notifications to FILE, the entry says "Delivery Succeeded" and I can get the notification in the file.

Thank you very much.






Re: the error of the SMTP in Sql Server 2005 notification services

carluman

I'm also working on a NS setup. I'm currently working on an asp.net app to allow people to sign up and was researching a problem when I came accross this post. Based on the link below I'm wondering if you take the single quotes from around myDevice and try DeviceAddress instead. Since I don't even have a working NS app yet I'm no expert but hope that helps. Please post back with results :D

http://msdn2.microsoft.com/en-us/library/aa902653(sql.80).aspx





Re: the error of the SMTP in Sql Server 2005 notification services

no_and_fo

Hi carluman

Thank you.

Yes,I have took the "DeviceAddress" instead of "myDevice" ,but the problem is still not

resolved. So now I am very confused and helpfull.





Re: the error of the SMTP in Sql Server 2005 notification services

fafnir

I know it sounds crazy, but... it might be helpful:

I had the same problem: File was working, but SMTP was not. I found that SMTP was not configured properly.

Sorry, I don't remember already exactly WHAT was wrong, but it has something to do with sending emails from behind a corporate firewall or proxy or something like that...

If you use your company's Exchange server's name instead of myservername, it should work, provided there are no errors in the app. Also, make sure that your machine's \etc\hosts file has mapping of the Exchange server's name to its IP address.

Also, you might find that you will be able to send emails to your company's email addresses, but not to external adresses (such as someone@hotmail.com, or gmail.com, etc.). In this case, ask your network admin to change the Exchange serevr's settings so that your local machine can do that.






Re: the error of the SMTP in Sql Server 2005 notification services

Joe Webb

Hi -

Are you specifying the local server Or are you using a remote smtp server How are you supplying the name of the smtp server

Have you tried using the local smtp server

You may want to try capitalizing the argument like so:

<Name> SmtpServer</Name>

HTH...

Joe






Re: the error of the SMTP in Sql Server 2005 notification services

no_and_fo

Hi all

My codes about the DeliveryChannels in the ICF file are following:
<DeliveryChannels>
<DeliveryChannel>
<DeliveryChannelName>EmailChannel</DeliveryChannelName>
<ProtocolName>SMTP</ProtocolName>
<Arguments>
<Argument>
<Name>SMTPServer</Name>
<Value>bb.ggcnt.com</Value>
</Argument>
<Argument>
<Name>UserName</Name>
<Value>%User%</Value>
</Argument>
<Argument>
<Name>Password</Name>
<Value>%Pwd%</Value>
</Argument>
<Argument>
<Name>BodyEncoding</Name>
<Value>utf-8</Value>
</Argument>
</Arguments>
</DeliveryChannel>
</DeliveryChannels>


Yes,I have the remote SMTP Server,and my email server need email account and password to log in,but when I write to the "username" and "password" in the upwords codes, and in the Event Viewer of the Windows Event Log mentioned: no invalidate parameter "username"กข"password" & The email address or SMTP server value invalidates.So whether I miss something Can ICF file dosen't define "username" and "password",and which parameter can define these parameter
When I throw out the codes :
<Argument>
<Name>UserName</Name>
<Value>%User%</Value>
</Argument>
<Argument>
<Name>Password</Name>
<Value>%Pwd%</Value>
</Argument>
and the erroe is still here : The email address or SMTP server value invalidates.

What can I do Thank you very much.




Re: the error of the SMTP in Sql Server 2005 notification services

Joe Webb

Hi no_and_fo -

You cannot specify login credentials using the built-in smtp delivery channel. SSNS makes the connection using the service account credentials.

See if this thread helps.

http://groups.google.com/group/microsoft.public.sqlserver.notificationsvcs/browse_thread/thread/911cfd57ca48ae10/db8a7a30113838bc lnk=gst&q=smtpserver&rnum=6&hl=en#db8a7a30113838bc

HTH...

Joe






Re: the error of the SMTP in Sql Server 2005 notification services

no_and_fo

Hi all

Thanks .
Problem has resolved.





Re: the error of the SMTP in Sql Server 2005 notification services

Karen Q

I have the same problem with the instance, i dont have the solution for this problem please help my i dont see how resolve i dont understand how work notification server very fine i dont understand all of the concept of this tool.

attach the error.

event provider enable pending

generator enable pending

distributor enable pending

and the other are fine (Enable)

regards.






Re: the error of the SMTP in Sql Server 2005 notification services

Joe Webb

Hi Karen -

When a component is pending, it means that it is waiting for the SSNS instance service to start. If you right click on the instance in SSMS and select 'Start', you should see the statuses change to enabled.

If you cannot start the service, it's generally a login permissions issue.

HTH...

Joe






Re: the error of the SMTP in Sql Server 2005 notification services

Karen Q

Hi Joe

When i click in start send me a error that say Time out has expired and the operation has not been completed (System.ServiceProcess) , as I can solve it

I have all the permissoins that see in the tutorial whith respect with the data base.

what other permissoins will be






Re: the error of the SMTP in Sql Server 2005 notification services

Joe Webb

Hi Karen Q -

If you're sure it's not a permissions issue, then I'd double check the server name to make sure you're pointing to the right machine. Pointing to a SQL Server instance that doesn't exist could also lead to a time out error message.

HTH...

Joe