'hi, below option of sending email ( gmail ) without Outlook with SMTP server
Sub SendEmail() ' Enable Reference> Object> Microsoft CDO for Windows 2000 Library Dim iMsg, iConf, Flds, nTo, nFr, rng, psw nTo = "your email address here" nFr = nTo rng = Range("a1").Value psw = "your email password here" Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields ' send one copy with Google SMTP server (with autentication) schema = "http://schemas.microsoft.com/cdo/configuration/" Flds.Item(schema & "sendusing") = 2 Flds.Item(schema & "smtpserver") = "smtp.gmail.com" Flds.Item(schema & "smtpserverport") = 465 Flds.Item(schema & "smtpauthenticate") = 1 Flds.Item(schema & "sendusername") = nTo Flds.Item(schema & "sendpassword") = psw Flds.Item(schema & "smtpusessl") = 1 Flds.Update With iMsg .To = nTo .From = nFr .Subject = "Important message" .ReplyTo = nFr Set .Configuration = iConf .TextBody = "the cell A1 changed to: " & rng SendEmailGmail = .Send End With MsgBox " Email sent to " & nTo & " successfully ! " Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing End Sub Private Sub Worksheet_Change(ByVal Target As Range) If ThisWorkbook.ActiveSheet.Range("A1") < 10 Then Call SendEmail Else End If End Sub 'Basole. Em domingo, 6 de outubro de 2013 17h34min31s UTC-3, Bill Q escreveu: > > Hi, > > I am using Excel 2007 and have Gmail as my primary email account. > > I have a dynamic spreadsheet that monitors different stock prices that is > refreshed ever "x" amount of minutes. > > I would like to have a small macro created so that when a certain cell is > either <= to a certain price, will automatically send me an email to my > Gmail account with the message to be defined later. > > Anyone ? > > Thanks in advance ? > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/groups/opt_out.