Link to home
Start Free TrialLog in
Avatar of h_tiwari
h_tiwari

asked on

why server name is displayed in place of sender name when a mail is sent ?

hi
My prob. is that when i send a mail through web using any id  @mailsend("....")by formula lang. in lotus notes i get server name in places of sender name, although using samething in client is working perfectly. what could be the cause of getting server name in place of sender name while processing document in web.
Avatar of madheeswar
madheeswar
Flag of Singapore image

Ur running the web agent through server. So, u r getting it.

While in note client, ur triggering the code through an action button and it takes ur name as sender.

And also, u r having mail file location document.

For web we don't have any locatoin document. So, u will see server name as sender.
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qwaletee
qwaletee

@MailSend works on the web, but is not SUPPORTED on the web, partially because of this issues.  The help for @MaiSend says, "You cannot use this function in Web applications."

Even if you enable the "run as web user" property, it will still put in the server name.  You need to use LotusScript to acieve the same effect.


Sub AtMailSend(doc as notesDocument, sendTo, cc, bcc, Subject as String, bodyText as string, bodyFields, includeDocLink )

    'sendTo, cc, bcc, bodyFields can all either be strings or arrays of strings; includeDocLink must be TRUE or FALSE

    Dim db as notesDatabase
    Set db = doc.parentDatabase
    Dim msg as notesDocument
    Set msg = db.createDocument

    msg.replaceItemValue "Form", "Memo"
    msg.replaceItemValue "SendTo", SendTo
    msg.replaceItemValue "CopyTo", CopyTo
    msg.replaceItemValue "BlindCopyTo", BlindCopyTo
    msg.replaceItemValue "Subject", Subject

    Dim body as New notesRichTextItem msg , "Body"
    Dim bodyPartItem as notesItem, bodyPartRTItem as notesRichTextItem
    body.appendText bodyText
    if isArray(bodyFields) Then
        forall bodyField in bodyFields
            if doc.hasItem(bodyField) Then
                set bodyPartItem = doc.getFirstItem(bodyField)
                if bodyPartItem.Type = RICHTEXT then
                    set bodyPartRTItem = bodyPartItem
                    body.appendRTItem bodyPartRTItem
                else
                    body.appendText bodyPartItem.Text
                end if
            end if
        end forall
    else
            if doc.hasItem(bodyFields) Then
                set bodyPartItem = doc.getFirstItem(bodyFields)
                if bodyPartItem.Type = RICHTEXT then
                    set bodyPartRTItem = bodyPartItem
                    body.appendRTItem bodyPartRTItem
                else
                    body.appendText bodyPartItem.Text
                end if
            end if
    end if

    if includeDocLink Then
        body.appendDocLink doc , doc.Subject(0)
    end if

End Sub
Avatar of h_tiwari

ASKER

dear all
prob solved long back but i was not able to respond sorry :(

after lots & load r/d answer came out to be simple one
see i have written a agent ( hidden)with choosing option simple action
in that i have written formula for "to field" and "subject " as text and check the "inclued document link in message" thats it and call the agent on submit button as usual @Command([ToolsRunMacro];"(mailonsubmit)"); it works fine with web i tell u  no longer i see server name in in place of sender. i was alway forcing user to login from the very start and for client it was as usual @mailsend
agent runs as web user & runtime is agentlists selection on selected document.
for point i think Hemanth can share atleat he has shown the way of using agent in that manner, see lotus script was the answer but my limitation for that particular thing was not possible i was wanted to use @formula

I don't know how to close this Question. From myside its over
have u guy seen my question " How to extract mail attachment in linux enviorment from a sheduled agent"
any answer???
Thanx for all ur support Keep the good work going
cheers
Harsh Tiwari