Send email attachments using Java through Outlook Express
Hi
Can anyone suggest how we can interface Outlook Express with java in
order to send email?
I want to add 'Email Friend' link in my project, on clicking on this
link Outlook Express should open with a specified file attached.
I searched on net also, but I am getting only JOC everywhere which is
not freeware.
Please suggest me on the same that how it can be done?
Thanks
Ashi
You can send files to Outlook Express using following:
using a windows exe runmenu. exe
File file = new File("./lib/runmenu.exe");
try
String commandForNotesMail =
file.getCanonicalPath() +
" \"/exec: send to\\mail recipient\" " + filename;
System.out.println("Cononical Path :" + commandForNotesMail);
Runtime.getRuntime()
.exec(commandForNotesMail);
catch (IOException e)
e.printStackTrace();
return true;
}
Similar Messages
-
How to send mail attachments using java mail
can any one help how to create mails attachments using java mail
you can do it like this:
Message msg = new MimeMessage(session);
String fileAttachment = "c:/test.txt";
Multipart mp = new MimeMultipart();
BodyPart bp = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileAttachment);
bp.setDataHandler(new DataHandler(fds));
bp.setFileName(fds.getName());
mp.addBodyPart(bp);
msg.setContent(mp);
... -
Sending email attachments using unix shell script
hi
I want to send report generated my spooled file as attachment using unix shell script.
Can somebody help me out ?
many thanksthanks a tonn it worked.
but i have another issue is it possible to add names in CC also ?
Also here is my code which spools the output of SP to a txt file. the File name is generated dynamically.
as shown below:
I need to send this generated file as attachement.
how do I do this? Here the shell script
=========================================================
#!/bin/sh
ORA_USER=scott
ORA_PWD=tiger
#Get the input parameter
if [ ! "$1" ]; then
STR="NULL"
else
STR="'"$1"'"
fi
#echo "exec pkg1($STR);"
#Connecting to oracle
sqlplus -s <<EOF
$ORA_USER/$[email protected]
---sql plus enviornment settings
set linesize 160
set pagesize 60
set serveroutput on size 1000000 for wra
set feedback off
set termout off
column dcol new_value mydate noprint
select to_char(sysdate,'YYYYMMDDHH24MISS') dcol from dual;
spool &mydate.report.txt
exec pkg1($STR);
spool off
EOF
exit
=========================================================
the file name will take sysdate as name so that every time a new file will be generated.
this file I need to send as attachment.
null -
Send email using Oracle Forms 6i through Outlook Express
I am working on oracle Forms 6i and Oracle 9i (9.2.0.1) database. My requirement is How to trigger email sending single client at a time while using Oracle Forms 6i through Outlook Express?
To do this I have written the following code.
PROCEDURE send_mail IS
OutlookApp OLE2.OBJ_TYPE;
NameSpace OLE2.OBJ_TYPE;
MailItem OLE2.OBJ_TYPE;
OLEPARAM OLE2.LIST_TYPE;
Send OLE2.OBJ_TYPE;
Attachments OLE2.OBJ_TYPE;
Attachment_dummy OLE2.OBJ_TYPE;
var1 varchar2(1000);
Begin
var1 := :mapiole.message;
OutlookApp := OLE2.CREATE_OBJ('Outlook.Application');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,'MAPI');
NameSpace := OLE2.INVOKE_OBJ(OutlookApp,'GetNameSpace',OLEPARAM) ;
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,0);
MailItem := OLE2.INVOKE_OBJ(OutlookApp,'CreateItem',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
OLE2.SET_PROPERTY(MailItem,'To',:to);
OLE2.SET_PROPERTY(MailItem,'Subject',:subject);
OLE2.SET_PROPERTY(MailItem,'Body', var1);
--add an attachment
if :mapiole.attach is not null then
Attachments := OLE2.GET_OBJ_PROPERTY(MailItem,'Attachments');
OLEPARAM := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(OLEPARAM,:attach);
Attachment_dummy := OLE2.INVOKE_OBJ(Attachments,'add',OLEPARAM);
OLE2.DESTROY_ARGLIST(OLEPARAM);
end if;
Send := OLE2.INVOKE_OBJ(MailItem,'Send');
--destroy objects
OLE2.RELEASE_OBJ(MailItem);
OLE2.RELEASE_OBJ(NameSpace);
OLE2.RELEASE_OBJ(OutlookApp);
END;
Create a block called MAPIOLE with the following canvas layout:
To: ============================
Subject: ============================
Message: ============================
============================
Attachment: ============================ SEND
When I press the SEND button then
Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
ORA-305500
How can I do this?
When I use Microsoft Outlook 2003 It works fine.
Please help me.
Thanks.Error comes "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
ORA-305500
hi
plz if there is any attach library recompile it or open the pll and compile it with ctrl+shift+k and ctrl+t.
sarah -
Trouble sending email attachments or using photo mail
Hi. I have Elements 6.0 and I'm using a HP computer with Vista. Starting about three days ago (for sure that I know of), I have not been able to send pictures by email attachment or photo mail in SHARE. I have been able to send pictures without problems in the past. When I "send" the pictures, everything looks fine (counting down of pictures sent displays and disappears as usual). When I pull down "find" and then "by history" and then "emailed to", its says my emails have been sent and how many pictures I have sent.
So, that is my question. What has happened that I can't send email attachments anymore and how can I fix it?
Thank you for any help or suggestions!
LauraWell I had a brief moment of elation this am. All 26 of the test images I mailed to myself showed up in my mail box and my husbands. Thought it was all fixed. Tried to mail another and so far have not received it. Is it possible that the speed of delivery is REALLY slow? There has always been an inordinate lag time in receipt; about 7 to 10 minutes. But 3 days seems a little ridiculous. In the mean time I registered for the free adobe photoshop. It is bare bones, really easy, and it works. Their email does not have imbedded photos, but it does work. Just go to photoshop.com.
-
Do I need to use Outlook as my email programme instead of Outlook Express if I want to use The Cloud to sync between PC and iPad? Can I transfer my existing contacts, emails and diary appointments from Outlook Express to Outlook? What is cheapest way to aquire Outlook?
iCloud only "syncs" data in the iCloud account, not data in other external accounts such as Gmail, Yahoo, etc. If your email, contacts and calendars are hosted by another external account, such as Gmail/Google, you may want to not sync this data using iCloud as you would have import it all to the iCloud account in order to do so. Instead, add your external account to your iOS devices and in Settings>Mail,Conacts,Calendars>Add Account and turn on contacts and calendar syncing with your external account.
-
How to send Secured Mail using Java Mail?
I want to send mails with "Send Secure" option using Java Mail. Now mails are being sent using Java Mail connecting to smtp host.
Appreciating your help.
Thanks.There are third party libraries to help with this. Bouncy Castle is very popular.
See the [JavaMail Third Party Products|http://java.sun.com/products/javamail/Third_Party.html] page. -
Ok. I hate this, but this is they way they have implemented it. I do not have access to the server code that this applicatio sits on, so I am only able to send specif commands with java through there interface. One of the commands for example is: password_reset "username" "new_password", there is also search_user "username", and uinfo "username". One of the command I really want to send is the password_reset command, but before I can do that I need to establish a ssh connection with username, and password. Not the username or password of the user that I am resetting, but the username and password of a user that has the privilege to reset passwords.
anyway someone said I could just user the execCommand("password_reset " + username + " " + password ) command. If that is true then How do I do the ssh connection? any examples would be great. I have one, but it is not working for some reason.
Here is the code:
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import com.trilead.ssh2.ChannelCondition;
import com.trilead.ssh2.Connection;
import com.trilead.ssh2.Session;
import com.trilead.ssh2.StreamGobbler;
public class SshTest
public static void main(String[] args)
Connection conn = null;
try
String host = "something.server.net";
String user = "someuser";
String user_pass = "somepassword";
conn = new Connection(host);
conn.connect();
conn.authenticateWithPassword(user, user_pass);
Session sess = conn.openSession();
// vusertochange
sess.execCommand("password_reset vusertochange newpasswordtest");
/* Read all output with streamgobblers */
StreamGobbler stdout = new StreamGobbler(sess.getStdout());
StreamGobbler stderr = new StreamGobbler(sess.getStderr());
/* Send the password (with a newline!) */
BufferedOutputStream stdin = new BufferedOutputStream(sess.getStdin());
stdin.flush();
//stdin.close(); // This is optional
/* Wait until the session has ended, maximum 60secs */
int res = sess.waitForCondition(ChannelCondition.EOF, 60 * 1000);
if ((res & ChannelCondition.EOF) == 0)
throw new IOException("A timeout occured while reading the output.");
/* OK, by now the whole output has been consumed by the two StreamGobblers */
/* Close the session */
sess.close();
/* Show the result of STDERR */
BufferedReader stderr_reader = new BufferedReader(new InputStreamReader(stderr));
while (true)
String line = stderr_reader.readLine();
if (line == null)
break;
System.out.println("STDERR:" + line);
/* Show the result of STDOUT */
BufferedReader stdout_reader = new BufferedReader(new InputStreamReader(stdout));
while (true)
String line = stdout_reader.readLine();
if (line == null)
break;
System.out.println("STDOUT:" + line);
catch (Exception e)
e.printStackTrace();
finally
if (conn != null)
conn.close();
The error I get is:
STDOUT:cshell won't execute arbitrary command 'password_reset vusertochange newpasswordtest'
any ideas what I am doing wrong?orozcom wrote:
STDOUT:cshell won't execute arbitrary command 'password_reset vusertochange newpasswordtest'It sounds like the permissions with the user you're connecting with won't allow this operation.
Don't know much about this, but maybe try 'su' and then 'password_reset ...' instead? -
Sending udp packets using java and receiving it using c
hi,
Is it possible to send udp packets using java and receive the same using c??????? if yes.... plz help immediately.The biggest issue is data format. The JVM is big endian, with 16-bit characters. The machine running 'C' could be almost anything. A (signed!) byte array is probably the easiest unit of exchange.
The Java program has its own techniques for storing/retrieving data to/from the byte array - and the C program has its own techniques. ASCII Strings are often the easiest to exchange - just convert the java String objects to byte array and send them.
apaliwal1 has already given the UDP calls to send/receive the data. -
I am having problems sending emails when using apps. I dont receive any emails when I try to send documents such as pdf or pictures. I tried sending it to my other email account but I don't get any email. What is wrong?
System Preferences > Network > your-connection-medium > (Assist me) > ( Diagnostics )
This sometimes provides additional helpful information, sometimes not so much. -
Send Email Attachments OBE issue
I was following the Oracle by Example (OBE) Sending Email Attachments and I got to step 10, under the section Create Items to Store Email Information, setting the LOV for the list of employee pictures and the LOV is being displayed with the filename followed by the html :
dog.gif<br /><img src="apex_util.get_blob_file?a=47495&s=1109906965016602&p=3&d=1822025729045755026&i=1822025415006755025&p_pk1=100&p_pk2=&p_ck=29A415A69350497EF7ED9962C42E9BA5" height="128" width="128" />)The LOV select statement is as follows:
select filename||'</br>'||
decode(nvl(dbms_lob.getlength(photo),0),0,null,
'<img src="'||apex_util.get_blob_file_src('P3_PHOTO',employee_id)
||'" height="128" width="128" />') img,
employee_id r
from oehr_employees
where mimetype like 'image%' order by 1
I get the hmtl tags literals not the actual html.
Why isn't showing up as html tags?
I put it on apex.oracle.com:
Logon credentials:
Workspace: RGWORK
Username: TESTER
Password: test123
Application: 47495. OBE New Features
Page: 6
The how-to tutorial is located at:
http://www.oracle.com/technology/obe/apex/apex31nf/apex31email.htm
Robert
http://apexjscss.oracle.comSorry - thought you were doing a report. I checked your app and the issue is security - in the Security region within Item attributes, Escape Special Characters was set to Yes (thus, you see the img tag rather than the image) - I changed this to No and now your image shows.
This is an old obe (for 3.1), that is why this step is not included. When we create items and reports, we make them a bit 'tighter' by default now.
-- Sharon
p.s. cute puppy -
Send email without using sender id
Hi all,
Is it possible to send email without using sender id?
Thanks in advancenvv wrote:
I m not asking this for spam. Actualy I m developing software that sends mail to many contacts. If i use sender address then they can use others like gmail, yahoo, or something like that instead.Sounds like spam software to me. -
"An error occurred when sending email" Reader XI PDF W7 Outlook 2010
"An error occurred when sending email" Reader XI PDF W7 Outlook 2010
To bypass client-side email software the submit button should point to a server-side script such as PHP or ASP.net.
For more information and examples visit the following website:
http://www.pdfemail.net/examples/ -
How to send attachments using java application and outlook
Hi ,
I created an application in java which is as
on the Conference Tab i can schedule a conference and with the send command on page it map all the scheduled data to outlook(with all conference details) and using outlook send option the mails are send to appropriate user.
but now i want to modify this application such as when i use the send command from my jsp page it should attach the file that is in .vcs or .ics format for auto updation of user calender.
can any one know how to send attachment using java application .Last time I checked, SMS was a service between carriers and doing SMS yourself was really tricky. Some services existed to let you do it but as I recall they wanted non-trivial money.
However, most phone carriers provide an email-to-SMS bridge of some kind.
So the easiest thing is just to send an email.
That's sending from a non-phone to a phone. There's a J2ME library to send/receive SMS from/to a phone.
However, this is from memory, and a little out of date, so I could be entirely wrong. Hope it helps anyway. -
How to use ActiveX of outlook express to realize the function of sending email using labview?
thanks!
I didn't manage to find a public ActiveX interface for Outlook Express, but I did find one for Outlook, and a few quick tweaks managed to get a message in the outbox. For some reason it wasn't sent (maybe I didn't have a user set up properly), but you can try playing with it to see.
Another option would be to use the built in SMTP VIs (unless you need POP3).
Try to take over the world!
Attachments:
Mail.vi 35 KB
Maybe you are looking for
-
Variant for create Purchase Order ?
Hi MM experts, how can i create 2 varients for one USER ID. when we create the po with ME21N in Personal Settings 1, how can we maintail 2 diferent plant ,storage location ,purch org ext... 2, creating of po with reference of (document overview o
-
XI_J2EE_ADAPTER_XI_HANDLER
Hello experts, We are facing a critical problem . We are getting the following error in IFR. Message Data Attribute Value Engine Adapter Engine Status System Error Repeatable Yes Cancelable Yes Start 17.01.2008 17:11:50 End 17.01.2008 22:11:29 Sender
-
My name is Senne Gorris and I own a concept art / animation blog. I always loved the drawings that firefox provides on their splash site when there is a new version or you just installed one. for example: http://www.cgtopia.eu/artikelimg/firefox-conc
-
I have photoshop elements 3.0. Am I safe running this on Windows 8?
I have Photoshop Elements 3.0. Am I safe running this on Windows 8?
-
Hi Guys. Could you please help me.....When I launch the LR CC appears a message sayng: "LR encountered an error when doing the cache visualization and needs to close". I start again and the same happens agian. How could I fix this?