Problem in sending mail in yahoo using lotus script in web

Hi all experts,

I m making one forum. When user post any query then mail goes to corresponding expert.My experts have a yahoo or hotmail id. I write one agent which run on webquerysave event of the form .It nicely send mail to our company’s id but could send mail in yahoo or any commercial id. I could not find out the problem. plz check i m sending my code…

Dim session As New notessession

Dim richStyle As NotesRichTextStyle

Dim s As New NotesSession

Set richStyle = s.CreateRichTextStyle

Dim db As notesdatabase

Dim Doc As NotesDocument

Set db =     s.currentdatabase

Set Doc = s.DocumentContext

sname =Evaluate("@Name([CN];@Subset(@DbName;1))")

richStyle.NotesColor = (COLOR_RED)

'	-----------------------------------------------------------------------------------------

Set doc1 = New NotesDocument( db )

Dim ritem As New NotesRichTextItem(doc1 ,"Body")

Call ritem.AppendStyle(richStyle)

richStyle.NotesColor = COLOR_BLUE

richStyle.NotesFont = FONT_ARIAL

Call ritem.AppendStyle(richStyle)

addtext=doc.Text(0)

ritem.appendtext(Chr(10) + addtext )

ritem.appendtext(Chr(10)+ Doc.User(0))

'ritem.appendtext(Chr(10)+Chr(10) + "Thanks" + Chr(10) + Chr(10)+Doc.User(0))	

Call doc.save(True,True)

doc1.Form = "Memo"

itemS=doc.BlindCopyTo

If itemS(0) <> "" Then

	For x=0 To Ubound(itemS)

		'Msgbox x

		doc1.Subject = Doc.Subject(0)

		doc1.principal = Doc.User(0)

		

					Call doc1.Send( False ,items(x))

	Next

End If



itemC=doc.CopyTo

If itemc(0) <> "" Then

	For x=0 To Ubound(itemC)

		'Msgbox x

		doc1.Subject = Doc.Subject(0)

		doc1.principal = Doc.User(0)

								Call doc1.Send( False ,itemc(x))

	Next

End If

Call doc.save(True,True)

-------Value of Text field is -----------

“Dear Sir / Madam ,”+@NewLine+@NewLine+"I have a query in the Area of “+ @UpperCase(SubArea)+”. Which is available at the below mentioned URL. Please click the URL to read the query. Please click on Reply, type your answer in Body and then press Submit to send an answer to me. “+@NewLine+@NewLine+“http://intranet.tatasteel.co.in/km/kmainternet.nsf/kmd/"+@Text(@DocumentUniqueID)+@NewLine+"Notes Link :” +AskID+ @NewLine+“If you think you are not the correct person to answer this query, please return it by clicking on Return and suggest the name of the appropriate person who can answer the query.”+@NewLine+@NewLine+” I am looking forward to an answer / solution at the earliest. "+@NewLine+@NewLine+“Thanks,”

I hope i clearly present my problem…

Thnx in bunch

Rishi

Subject: Problem in sending mail in yahoo using lotus script in web…

Hi Rishi,

What is the value of itemC? Is it a multivalue field?

Also, you don’t need to loop through the sends like that - you can pass a list of names to the send function, so just

call doc1.Send(false, doc.copyTo)

Subject: RE: Problem in sending mail in yahoo using lotus script in web…

hi Kieran,

Thnx for giving interest in my problem.

Itemc takes the value from CopyTo field , CopyTo field takes data from dblookup and its a “Allow multiple value” field.

Also SendTo & BlindCopy fields take data from another view. Plz give me ur valuable time.

thnx again

Rishi