Hi All,
Use below code to send the Mail

'Library CDO
'D:\WINDOWS\system32\cdosys.dll
'Microsoft CDO for Windows 2000 Library

Const cdoBasic = 1 'basic (clear-text) authentication

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = """Vik"" <[email protected]>"
objMessage.To = "[email protected]"
objMessage.TextBody = "This is some sample message text.." & vbCRLF & "It
was sent using SMTP authentication."

'This section provides the configuration information for the remote SMTP
server.
With objMessage.Configuration.Fields
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing";) = 2
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver";) = "
smtp.gmail.com"
    'Type of authentication, NONE, Basic (Base64 encoded), NTLM
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate";)
= cdoBasic

    'Your UserID on the SMTP server
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername";) =
"Your GMAIL ID"
    'Your password on the SMTP server
    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword";) =
"GMAILPASSWORD"

    'Server port (typically 25)
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport";)
= 25

    'Use SSL for the connection (False or True)
    'Get error: Must issue a STARTTLS command first, if server use SSL but
you set False
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl";) =
True

    'Connection Timeout in seconds (the maximum time CDO will try to
establish a connection to the SMTP server)
    .Item("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout";) = 60

    .Update
End With
'End remote SMTP server configuration section

On Error Resume Next
objMessage.Send
If Err <> 0 Then
    Msgbox "Send email failed: " & Err.Description
Else
    Msgbox "OK!"
End if

You can add attchment fine in the objMessage.attachment

Vikas Thange

On Wed, Oct 17, 2012 at 3:58 PM, Ravi kiran <[email protected]>wrote:

> Hi,
>
> First please check with security concerns with client.Use filezilla or any
> other FTP tools.
> if there is no issue,if internet works use gmail :)
>
>
>
>
>
> On Wed, Oct 17, 2012 at 7:28 AM, Ganesh muralidharan 
> <[email protected]>wrote:
>
>> You could try using the web version of exchange like webmail.
>>
>>
>> On Tue, Oct 16, 2012 at 9:52 PM, Sumanhyd <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I am using remote machines to perform my regression. At the end of suite
>>> it will generate html report and sends mail to a group. The problem here is
>>> Outlook is not configured on remote machines,so how to send mail even if
>>> Outlook is not configured.
>>>
>>> Regards,
>>> Suman
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>> group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/MercuryQTP?hl=en
>>>
>>
>>
>>
>> --
>> Regards,
>>
>>
>> Ganesh Muralidharan
>> 'God Never Forgets'
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to