Try out Tanveers code not sure how the variables values will be substituted
as you are using double quotes " - "emailid1; emailid2; emailid3"

On Tue, Jun 15, 2010 at 8:58 AM, Tanveer <[email protected]> wrote:

> Sorry forgot to mention.
>
> The delimiter used for separating the email addresses is ";" not ","
>
> Thanks
> Tanveer
>
>
> On Tue, Jun 15, 2010 at 7:27 PM, Tanveer <[email protected]> wrote:
>
>> Instead of trying that code, just pass your *SentTo* variable value =
>> "emailid1; emailid2; emailid3" to the function.
>>
>> It will work.
>>
>> Thanks
>> Tanveer
>>
>>
>>
>>
>> On Tue, Jun 15, 2010 at 7:22 PM, Mr. Joy Vaz <[email protected]> wrote:
>>
>>>
>>> Hi,
>>> I used script provided by Ganesh. But i got the same error.
>>> SS attached:-QTP_Mail.JPG
>>>
>>> On Tue, Jun 15, 2010 at 9:46 AM, Ganesh muralidharan <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I tried below code with 2 e-mail adrs in a vbs and it worked fine :
>>>>
>>>> Set ol=CreateObject("Outlook.Application")
>>>> Set Mail=ol.CreateItem(0)
>>>>  Mail.to="[email protected];[email protected]"
>>>>
>>>> Mail.Send
>>>> Set Mail = Nothing
>>>> Set ol = Nothing
>>>>
>>>> On Tue, Jun 15, 2010 at 8:38 AM, Joy <[email protected]> wrote:
>>>>
>>>>> I am using following function to send a mail from outlook. It can send
>>>>> a mail to 3 email ids at a time. i.e. SendTo,SendToCC,SendToBCC. I
>>>>> want to send to more than three email Ids.
>>>>> I tried to pass endToBCC = "emailid1,emailid2". but it display me
>>>>> error as "General run error." at line "Line (277): "    Mail.Send"."
>>>>> is it possible to pass two email ids?
>>>>>
>>>>> Function SendMail(SendTo,SendToCC,SendToBCC ,Subject, Body,
>>>>> Attachment)
>>>>>    Set ol=CreateObject("Outlook.Application")
>>>>>    Set Mail=ol.CreateItem(0)
>>>>>    Mail.to=SendTo
>>>>>    Mail.CC=SendToCC
>>>>>    Mail.BCC=SendToBCC
>>>>>    Mail.Subject=Subject
>>>>>    Mail.Body=Body
>>>>>    If (Attachment <> "") Then
>>>>>        Mail.Attachments.Add(Attachment)
>>>>>    End If
>>>>>    Mail.Send
>>>>>    Set Mail = Nothing
>>>>>    Set ol = Nothing
>>>>> End Function
>>>>>
>>>>> --
>>>>> 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]<mercuryqtp%[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]<mercuryqtp%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/MercuryQTP?hl=en
>>>
>>>
>>>
>>>
>>> --
>>> Cheers...!!!!!
>>>
>>> Joy
>>> --
>>> 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]<mercuryqtp%[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]<mercuryqtp%[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

Reply via email to