使用 JSL 發送電子郵件我正在嘗試使用 JSL 發送電子郵件作為資料檢索查詢的一部分。如何將資料表或日誌表嵌入到簡訊正文中?
謝謝
回覆:使用 JSL 發送電子郵件嗨@dadawasozo ,
據我所知,我相信您只能將其添加為附件,而不能添加到電子郵件正文中。我認為它只能處理電子郵件中的文字。
DS
回覆:使用 JSL 發送電子郵件嗨,DS,
是否可以在電子郵件內文(不是附件)中發送圖片並同時附上表格? Eval() 和取得文字不適用於圖片
回覆:使用 JSL 發送電子郵件據我所知。回覆:使用 JSL 發送電子郵件你好。感謝你的快速回覆。
但是,我想再問一下,是否可以將照片附在郵件正文上?先感謝您。
回覆:使用 JSL 發送電子郵件嗨@lalala ,
不確定是否有辦法使用此線程之前列出的命令來執行此操作。文字僅以製表符分隔,您可以在電子郵件中對其進行編輯。當以文字形式發送表格時,我不知道有任何命令可以修改它
但是,有一個可能的解決方法可能適合您的需求。您必須以圖片形式獲取數據表報告,保存它,然後將其作為附件發送。它看起來像 JMP 報告視窗中的資料表格式。
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt = Data Table( "Big Class" );
path="your path\"; //be sure to have the last backslash included in this.
tb=dt<<GET as="" report=""></GET>
You can of course save the picture in different formats than png.
The attachment will look like this:
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic.png" style="width: 400px;"><span class="lia-inline-image-display-wrapper" image-alt="pic.png" style="width: 142px;"><img src="https://us.v-cdn.net/6038925/uploads/images/30392i0B4D2C1C507D8C67/pic.png" role="button" title="pic.png" alt="pic.png" /></span></SPAN>
Not ideal, but the data will be formatted and aligned as desired. It won't be editable or copy/pastable like the text email version. Perhaps you can put in a request to JMP to have them provide more options for the Get Text() command so it can provide more complex formatting options?
Hope this helps!,
DS
回覆:使用 JSL 發送電子郵件你好。有沒有辦法固定每列的對齊方式?或者如果我可以更改此HTML 電子郵件中使用的預設字體樣式,因為使用的預設字體樣式(arial)中的字母每個字母佔用不同的空間(例如“I”具有不同的空間),因此該列似乎未對齊比“M”)。那麼有沒有辦法改變字體樣式或任何其他建議如何修復每列的對齊方式。謝謝。
回覆:使用 JSL 發送電子郵件很高興聽到您解決了郵件用戶端問題。奇怪的是它竟然如此依賴於此,但回車符也是如此。很高興它現在為你工作。
DS回覆:使用 JSL 發送電子郵件您好,確實是電子郵件用戶端。我卸載了 Mailbird 並使用 Outlook 並且工作正常...
感謝您的幫忙!
回覆:使用 JSL 發送電子郵件您好,這是列印螢幕...我認為問題可能是因為我沒有使用 Outlook 作為電子郵件用戶端,而是使用 Mailbird。將嘗試配置 Outlook 並更新

回覆:使用 JSL 發送電子郵件嗨@Stefan ,
這實在是太奇怪了。我在 W10 64 位元上運行 JMP Pro 15.2.1。這個功能當然不依賴專業版,所以我無法想像是這樣的。當我為 Big Class 運行該程式碼時,我收到以下電子郵件:

您是否準確地複製/貼上了程式碼,僅更改了電子郵件地址?如果更改了電子郵件地址以外的程式碼,則可能會影響電子郵件中的格式。您有從 JMP 收到的代碼和電子郵件的螢幕截圖嗎?
DS
回覆:使用 JSL 發送電子郵件@SDF1感謝您的快速回复,嘗試了您推薦的幾個選項,但仍然沒有樂趣。我在 Windows 上運行,JMP 15.2.1
這是電子郵件正文的摘錄...
數據為姓名、年齡、性別、身高、體重...
回覆:使用 JSL 發送電子郵件嗨@Stefan ,
使用所謂的「轉義序列」有時會有點棘手。有時它們按照人們認為應該的方式工作,但有時需要以不同的方式呼叫它們。它有點像 :Column 與 Column(dt, #) 或 As Column()。它們都參考了專欄,但在某些情況下,其中一個比另一個更好。
不管怎樣,您想要一個回車的具體範例,這裡是一個與 JMP 中內建資料表一起使用的範例。
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt = Data Table( "Big Class" );
tb=dt<<GET as="" report=""></GET>
You don't have to have the extra concatenate || in there between "The data is " and !\n. You can instead write it as "The data is !\n" || Eval() and it'll work just the same. But, however you implement it, the !\n must be in quotations: "\!n" for it to be read correctly.
One note that might be the reason you're having problems is the host operating system. If you're working in OS vs Windows, then the carriage return is different: CR vs CR LF, respectively. If you're on a Mac, the "\!n" won't work. Instead, you should use "\!N" with a capital N. When you use that, it insert a line break appropriate for the host operating system.
Hope this helps!,
DS
回覆:使用 JSL 發送電子郵件你好,你是如何添加回車符的,我已經嘗試了\!n 的所有選項,但沒有成功。您可以添加一個例子嗎?
乾杯!
回覆:使用 JSL 發送電子郵件不客氣。我還發現,如果您在“開頭句”之後的引號內包含 \!n,則可以在電子郵件中列印資料表之前有一個回車符。回覆:使用 JSL 發送電子郵件嗨,DS,
非常感謝!!這就是我所需要的!我感謝您的幫助。
大樓
回覆:使用 JSL 發送電子郵件嗨@lou ,
這是一個巨大的挑戰,我想我已經解決了。應該只有大約三行程式碼。
Names Default To Here( 1 );
dt = Data Table( "My Data Table" ); //this defines whichever data table you're dealing with
tb=dt<<GET as="" report=""></GET>
I tested it on a data table of mine and it worked great. It even puts the text in a data table style/format. It is just text, but this should solve the original problem.
UPDATE: I went back and tested if you could add more text to the body and you can if you wrap the <<GET text="" portion="" in="" an="" eval=""></GET>
Hope this helps!,
DS
回覆:使用 JSL 發送電子郵件嗨,DS,
感謝您的回覆。附加是一種替代方法。仍在尋找一種方法將其添加到主要訊息中,無論是透過表格、日記還是圖片。
大樓
回覆:使用 JSL 發送電子郵件嗨@lou ,
我在腳本索引中搜尋了 Mail,發現了這個:
Names Default To Here( 1 );
Mail( "test@example.com", "revelation", "JMP is great.", "$SAMPLE_DATA/Big Class.jmp" );
我用警報腳本範例對其進行了測試,它向我發送了一條訊息。我沒有附加任何 JMP 文件,不確定它是否會嵌入電子郵件正文中,但它至少會提供添加附件的功能。應該可以解決你的問題。
希望這可以幫助!,
DS