Skip navigation
Currently Being Moderated

About send a e-mail with jsx in PhotoshopCS3 .

Feb 26, 2011 7:34 AM

I want to send a e-mail with jsx.

 

I got a sample script , and be able to send a e-mail .

 

But , I have some question.

 

1.Japanese character changed to "?". Can I get the non-converted characters?

2.I want to send as "CC" too. I can send for two or more addresses . But It is not "CC". Is there a suitable command?

3."To:" field make  addresses to "undisclosed-recipients". How to show the addresses?

 

 

sample Script

// ↓ Server
var mailServer = "ooo.xxx.co.jp";

// To:
var mailAddress = "abc@xxx.co.jp";
// Subject:
var mailTitle = "e-mail test";
// Text:
var mailText = "e-mail test\r\ntest\r\nあいうえお"; //Japanese is contained.

// function >>sendmail
sendmail(mailServer, mailAddress,mailTitle,mailText);

function sendmail(mailServer, mailAddress,mailTitle,mailText){
    var sObj = new Socket();
    if (sObj.open(mailServer+":25")) {
        sObj.writeln("HELO "+mailServer);
        var txt = sObj.read();


        // ↓From:
        sObj.writeln("MAIL From: xxx@xxx.co.jp");
        txt = sObj.read();

 

        // ↓To:
        sObj.writeln("RCPT To: "+mailAddress);
        txt = sObj.read();

        sObj.writeln("DATA");

        // ↓ Subject:
        sObj.writeln("Subject: "+mailTitle);
        txt = sObj.read();

 

        // ↓ Text
        sObj.writeln(mailText);
        txt = sObj.read();

        sObj.writeln(".");
        txt = sObj.read();

        sObj.writeln("QUIT");
        txt = sObj.read();

        sObj.close();
    }
}

testEmail.jpg

 

 

Thank you.

 

Nakamori

 
Replies
  • Currently Being Moderated
    Feb 26, 2011 3:29 PM   in reply to Tatsu_

    It looks like you would need to send the text uuencoded then decode the recieved email, this might help...

    http://www.webtoolkit.info/javascript-base64.html

     

    You could see if this might help with the fields...

     

    
    // ↓ Server
    var mailServer = "ooo.xxx.co.jp";
    // To:
    mailAddress = "emailAddress1"; 
    mailAddress2 = "EmailAddress2"; 
    // Subject:
    var mailTitle = "test";
    // Text:
    var mailText = "e-mail test\r\ntest\r\nあいうえお"; //Japanese is contained
    printText = true;
    // function >>sendmail
    sendmail(mailServer, mailAddress,mailTitle,mailText);
    function sendmail(mailServer, mailAddress,mailTitle,mailText){
        var sObj = new Socket();
        if (sObj.open(mailServer+":25")) {
            sObj.writeln("HELO "+mailServer);
            var txt = sObj.read()+"\n";
            // ↓From:
            sObj.writeln("MAIL From: xxx@xxx.co.jp")
            txt += sObj.read()+"\n";
            // ↓To:
            sObj.writeln("RCPT To: "+mailAddress);
           sObj.writeln("RCPT To: "+mailAddress2);
            txt += sObj.read()+"\n";
            sObj.writeln("DATA");
            sObj.writeln("From: "+mailAddress2);
            sObj.writeln("To: "+mailAddress);
            sObj.writeln("Cc: "+mailAddress2);
            // ↓ Subject:
            sObj.writeln("Subject: "+mailTitle);
            txt += sObj.read()+"\n";
            // ↓ Text
            sObj.writeln(mailText);
            txt += sObj.read()+"\n";
            sObj.writeln(".");
            txt += sObj.read()+"\n";
            sObj.writeln("QUIT");
            txt += sObj.read()+"\n";
    if(printText) $.writeln(txt);
            sObj.close();
        }
    }
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points