Contributions
Re: email's are not getting sent. URGENT !!!!
Thanks for the replyVince. But the result is all the same after doing further more investigation i got to know that the gmail smtp server which i was using is blocked by our firewall and because of that reason i was unable to send mail. ( Now I need to use different method to send mail ) In addition to that i was checking out another test complete sendmail. The parameter for this method are BuiltIn.SendMail(ToAddress, FromHost, FromName, FromAddress, Subject, Body, FileName1, FileName2..FileNameN) Out of all there parameter can someone please explain me about theFromHost parameter.In help it says "The host from which the message will be sent.". Can someone please help me with an example to understand this method. Thanks in Advance Nikhil1.6KViews0likes0Commentsemail's are not getting sent. URGENT !!!!
Hi All I am trying to send an email with an attachment using the script which in present in smartbear support artical, but the amils are not getting sent atall. The script executes successfully but no emails are getting sent.Please find the script below. http://smartbear.com/support/viewarticle/9020/ Function SendEmail(mFrom, mTo, mSubject, mBody, mAttachment) Dim smtpServer, portNumber, userName, userPassword Dim useAutentification, useSSL, connectionTimeout Dim schema, mConfig, mMessage smtpServer = "smtp.gmail.com" smtpPort = 465 userLogin = "XYZ@gmail.com" ' e.g. abc@gmail.com userPassword = "Password" autentificationType = 1 ' cdoBasic connectionTimeout = 30 ' Required by GMail useSSL = True Err.Clear() On Error Resume Next schema = "http://schemas.microsoft.com/cdo/configuration/" Set mConfig = Sys.OleObject("CDO.Configuration") mConfig.Fields.Item(schema & "sendusing") = 2 ' cdoSendUsingPort mConfig.Fields.Item(schema & "smtpserver") = smtpServer mConfig.Fields.Item(schema & "smtpserverport") = smtpPort mConfig.Fields.Item(schema & "sendusername") = userLogin mConfig.Fields.Item(schema & "sendpassword") = userPassword mConfig.Fields.Item(schema & "smtpauthenticate") = autentificationType mConfig.Fields.Item(schema & "smtpusessl") = useSSL mConfig.Fields.Item(schema & "smtpconnectiontimeout") = connectionTimeout mConfig.Fields.Update() Set mMessage = Sys.OleObject("CDO.Message") Set mMessage.Configuration = mConfig mMessage.From = mFrom mMessage.To = mTo mMessage.Subject = mSubject mMessage.HTMLBody = mBody If 0 < Len(mAttachment) Then mMessage.AddAttachment(mAttachment) End If mMessage.Send() If Err.Number > 0 Then Call Log.Error("E-mail cannot be sent", Err.Description) SendEMail = False Err.Clear() Else Log.Message("Message to <" & mTo & "> was successfully sent") SendEMail = True End If End Function With Regards Nikhil C. Indurkar23KViews0likes12Comments