Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,


Now am successfully done logged my yahoomail page using powershell. But i dont know how to fill message body. Here am using $IE.document.getElementsByTagName("body")="MY SUBJECT" But this not used. Here with i had post my codings. all replies are welcome. Am using Microsoft Powershell.



VB
$url="www.ymail.com"

$username="dhinesh_kumar1@yahoo.com"

$password="xxxxxxxxxx"

$IE=New-Object -comobject InternetExplorer.Application

$IE.visible=$true

$IE.Navigate($url)

While($IE.busy){Start-Sleep 0.5}

[System.Threading.Thread]::Sleep(3000)

$IE.document.getElementById("username").value=$username


$IE.document.getElementById("passwd").value=$password

$IE.document.getElementById(".save").click();

[System.Threading.Thread]::Sleep(5000)

$IE.document.getElementById("global_compose_top").click();

[System.Threading.Thread]::Sleep(5000)

$toaddr="dhkumar11@gmail.com"

$sub_value="Hi guys"

$IE.document.getElementById("to").value=$toaddr

$IE.document.getElementById("Subj").value=$sub_value

$IE.document.getElementsByTagName("body").innerText="THIS IS E-MAIL BODY"

$IE.document.getElementById("send_top").click();

$cmd.Quit();




Thanks and Regards,

Dhineshkumar Velmayil.
Posted
Updated 7-Jun-13 5:48am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900