Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 email script

Author  Topic 

Angela4
Starting Member

6 Posts

Posted - 2012-06-21 : 21:31:04
anyone know how to create auto email script by using google mail server?

I want to create a script that will go get all require data from NEnkTbl, then those detail will then loop in an email and auto send to few email address on everyday 8am.

Anyone can give me sample on how to do this?
thanks in advance..

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-06-21 : 22:00:44
first you need to setup Database Mail, then you can use use to send out the email. To automate it, use SQL Agent.

the following 2 links should be helpful

Database Mail Configuration Wizard
SQL SERVER – 2008 – Configure Database Mail – Send Email From SQL Database



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Angela4
Starting Member

6 Posts

Posted - 2012-06-21 : 23:27:28
i read that article before but not understand.. please share with sample or detail step how to setup..
beside, i looking for email script using Google mail server, smtp server is not prefer..
thanks..
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-06-21 : 23:58:25
What have you tried ? Did you follow the step by step guide by Pinal Dave (the last link) ?

Which part that you don't understand ?

There isn't any different for setting using your company's email or gmail. The only diff is the Server Name and Port Number. Typically for gmail it should be smtp.gmail.com and port 587


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Angela4
Starting Member

6 Posts

Posted - 2012-06-22 : 04:19:00
that i try before, need to use of smpt server..
now my problem is i canot use of smtp server, is there any way to create the email script without smtp server?
Go to Top of Page
   

- Advertisement -