Unable to send mail to multiple recipients with attachment
I'm using a script given in the Oracle page - http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt for sending mail with attachment. Although I'm able to send mail with attachment to a single user, but the same can't be done while the recipients are more than one. Can some one help me ?
Hi,
Ca you please send me an example set of parameteres that we need to pass to make this program work?
I'm not able to attach a file to this program.Can youe please let me know how I can attach a file called 'Test.txt' kept at 'D:\' to this program?
Thanks.
Bhavin
Similar Messages
-
Sending Mails to Multiple Recipients using UTL_SMTP
create or replace procedure send_mail(msg_text varchar2) is
c utl_smtp.connection;
PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
BEGIN
utl_smtp.write_data(c, name || ': ' || header || utl_tcp.CRLF);
END;
BEGIN
c := utl_smtp.open_connection('outlook.abc.com');
utl_smtp.helo(c, 'abc.com');
utl_smtp.mail(c, '[email protected]');
utl_smtp.rcpt(c, '[email protected]');
utl_smtp.open_data(c);
send_header('From', '"root" <[email protected]>');
send_header('To', '"abc" <[email protected]>');
send_header('Subject', 'WARNING: Salary has been changed');
utl_smtp.write_data(c, utl_tcp.CRLF || msg_text);
utl_smtp.close_data(c);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
BEGIN
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
NULL; -- When the SMTP server is down or unavailable, we don't have
-- a connection to the server. The quit call will raise an
-- exception that we can ignore.
END;
raise_application_error(-20000,
'Failed to send mail due to the following error: ' || sqlerrm);
END;
==============
when I execute the above using
sql> exec send_mail('hihihih');
I am getting the mails..no problems...
So..I created the following trigger and used the above procedure to send the mail...
CREATE OR REPLACE TRIGGER test_emp_table_trg
AFTER UPDATE
ON test_emp_table
FOR EACH ROW
WHEN (NEW.sal <> OLD.sal)
DECLARE
l_employee_name VARCHAR2 (240);
l_old_sal VARCHAR2 (240);
l_new_sal VARCHAR2 (240);
l_message VARCHAR2 (240);
BEGIN
/* Gets the employee full name */
BEGIN
SELECT ename
INTO l_employee_name
FROM test_emp_table
WHERE empno = :OLD.empno;
EXCEPTION
WHEN OTHERS
THEN
l_employee_name := NULL;
END;
/* Gets the old Salary */
BEGIN
SELECT sal
INTO l_old_sal
FROM test_emp_table
WHERE empno = :OLD.empno;
EXCEPTION
WHEN OTHERS
THEN
l_old_sal := 0;
END;
/* Gets the new salary */
BEGIN
SELECT sal
INTO l_new_sal
FROM test_emp_table
WHERE empno= :NEW.empno;
EXCEPTION
WHEN OTHERS
THEN
l_new_sal := 0;
END;
l_message:=
'Employee Name= '
|| l_employee_name
|| 'Old Salary= '
|| l_old_sal
|| 'New Salary= '
|| l_new_sal;
BEGIN
send_mail (l_message);
END;
END;
===================
I am not getting desired output..what might be problem friends...I am getting 0 values for old salary and new salary......
One more thing..when i use 2 receipts in the send_mail procedure like this...I added the following lines in the procedure to send to multiple receipents..
======
utl_smtp.rcpt(c, '[email protected]');
utl_smtp.rcpt(c, '[email protected]');
=============
Pleas have a look and correct me, where i went wrong....
Edited by: oraDBA2 on Sep 22, 2008 3:12 PMHi, You can use the following routine to send mail to multiple recipients through utl_smtp.
create or replace package mail_pkg
as
type array is table of varchar2(255);
procedure send( p_sender_e_mail in varchar2,
p_from in varchar2,
p_to in array default array(),
p_cc in array default array(),
p_bcc in array default array(),
p_subject in varchar2,
p_body in long );
end;
create or replace package body mail_pkg
begin
g_crlf char(2) default chr(13)||chr(10);
g_mail_conn utl_smtp.connection;
g_mailhost varchar2(255) := 'ur mail server';
function address_email( p_string in varchar2,
p_recipients in array ) return varchar2
is
l_recipients long;
begin
for i in 1 .. p_recipients.count
loop
utl_smtp.rcpt(g_mail_conn, p_recipients(i));
if ( l_recipients is null )
then
l_recipients := p_string || p_recipients(i) ;
else
l_recipients := l_recipients || ', ' || p_recipients(i);
end if;
end loop;
return l_recipients;
end;
procedure send( p_sender_e_mail in varchar2,
p_from in varchar2,
p_to in array default array(),
p_cc in array default array(),
p_bcc in array default array(),
p_subject in varchar2,
p_body in long );
end;
is
l_to_list long;
l_cc_list long;
l_bcc_list long;
l_date varchar2(255) default
to_char( SYSDATE, 'dd Mon yy hh24:mi:ss' );
procedure writeData( p_text in varchar2 )
as
begin
if ( p_text is not null )
then
utl_smtp.write_data( g_mail_conn, p_text || g_crlf );
end if;
end;
begin
g_mail_conn := utl_smtp.open_connection(g_mailhost, 25);
utl_smtp.helo(g_mail_conn, g_mailhost);
utl_smtp.mail(g_mail_conn, p_sender_e_mail);
l_to_list := address_email( 'To: ', p_to );
l_cc_list := address_email( 'Cc: ', p_cc );
l_bcc_list := address_email( 'Bcc: ', p_bcc );
utl_smtp.open_data(g_mail_conn );
writeData( 'Date: ' || l_date );
writeData( 'From: ' || nvl( p_from, p_sender_e_mail ) );
writeData( 'Subject: ' || nvl( p_subject, '(no subject)' ) );
writeData( l_to_list );
writeData( l_cc_list );
utl_smtp.write_data( g_mail_conn, '' || g_crlf );
utl_smtp.write_data(g_mail_conn, p_body );
utl_smtp.close_data(g_mail_conn );
utl_smtp.quit(g_mail_conn);
end;
end;
begin
mail_pkg.send
(p_sender_e_mail => 'urmail',
p_from => 'urmail',
p_to => mail_pkg.array( 'urmail','othersmail' ),
p_cc => mail_pkg.array( ' othermail ' ),
p_bcc => mail_pkg.array( '' ),
p_subject => 'This is a subject',
p_body => 'Hello Buddy, this is the mail you need' );
end;
/ -
How do I send mail to multiple recipients?
I am running Mavericks 10.9.5. I am having trouble sending mail to multiple recipients. I type in the first person’s name and the e-mail address appears. When I want to send mail to 2 more people, I can’t. I type a comma and then a space and then the second person’s name. All that appears is a duplication of the first person’s name. I did not have this kind of trouble when I was running OS X, version 10.6.8. I could type the names of all recipients in the “To”
line. What can I do?See the response to your other post
-
Sending mails to multiple recipients
Hi,
I need to send an e-mail to multiple recipients, none of which may know that the mail was sent to others as well. Of course, the first idea was to use the BCC-field. However, if I do that, the receipients get a mail with an empty To-Field, which looks both stupid and suspicious. Is there a way to send a mail in such a way that each recpient has their own address in the To-Field? I also played around a bit with Automator but I couldn't find anything.Hi Phunkjoker!
I don't think you can, except by sending each individually.
The only alternative that I can figure out is to send it to yourself, and have the other recipients in the BCC field? -
Retrieve multiple e-mail address and send mail to multiple recipients
Hello,
I wonder if somebody could help me...at least with the clue to do the following.
I have a form, with a textarea , where the people should put the e-mail addreses of all the people that later will receive all the form data via e-mail..
I do not know how to retrieve all this e-mail addresses from the textarea (format?) and then how to send the e-mail to multiple recipients .
It works for one...but I do not know how to do this for several recipients...
could you please help?There is a setReceiptants method on the Message object.
http://java.sun.com/products/javamail/javadocs/javax/mail/Message.html#setRecipients(javax.mail.Message.RecipientType,%20javax.mail.Address[])
You will need to create an array of Addresses to feed it (just make space, commas, and semi-colons be tokens in your string and iterate it to create the address array)
travis (at) overwrittenstack.com -
Unable to send emails to multiple recipients through oracle storedprocedure
I have the email code working with single email in the To address but I am looping through the table and getting a semicolon separated emails and assining to_mail and I am unabl to send any emails to any users in To address but works for cc_address users. I am getting the following error in the stored procedure when compiling. Please help if any suggestions or any one came accross this issue. Thanks.
ORA-29279: SMTP permanent error: 501 #5.1.1 bad address @abc.com
ORA-06512: at "SYS.UTL_SMTP", line 29
ORA-06512: at "SYS.UTL_SMTP", line 110
ORA-06512: at "SYS.UTL_SMTP", line 252
ORA-06512: at "abc_owner.SendMail", line 101
ORA-06512: at line 10900045 wrote:
I have the email code working with single email in the To address but I am looping through the table and getting a semicolon separated emails and assining to_mail and I am unabl to send any emails to any users in To address but works for cc_address users. I am getting the following error in the stored procedure when compiling. Please help if any suggestions or any one came accross this issue. Thanks.
ORA-29279: SMTP permanent error: 501 #5.1.1 bad address @abc.com
ORA-06512: at "SYS.UTL_SMTP", line 29
ORA-06512: at "SYS.UTL_SMTP", line 110
ORA-06512: at "SYS.UTL_SMTP", line 252
ORA-06512: at "abc_owner.SendMail", line 101
ORA-06512: at line 10when all else fails, Read The Fine Manual
http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_smtp.htm#i1002798
RCPT Function
This subprogram specifies the recipient of an e-mail message.
"To send a message to multiple recipients, call this routine multiple times. "
"Each invocation schedules delivery to a single e-mail address." -
Unable to send encrypted emails to recipients with valid, trusted certs
I'm trying to send an encrypted email to a recipient for whom I have a valid, trusted cert. When I view his cert in Keychain, it gets a green check mark for being valid. Under Trust, I have "Always Trust" selected for "Secure Mime (S/MIME)" and "X.509 Basic Policy". All the certs in the chain are in place and trusted with these same settings.
Signed emails from this user get a black check mark in the Security field of the Mail message viewer. I can also click the lock closed when writing the email. However, when I click Send, I get an error that "An error occurred while trying to encrypt your message. Verify that you have valid certificates in the keychain for all of the recipients."
I have the cert for the user plus the others in the trust chain in my login keychain as described above. I have a DoD ECA certificate, but this happens with non-ECA recipients. I'm unable to get the lock to close with ECA recipients or even get Mail to show that signatures from users with ECA certificates are valid.
Any help would be greatly appreciated!
Thanks,
AndreasYou said you were closing the lock on the certificate, or public key, which I've never had to to to send or receive encrypted email.
There are encryption and signature icons that appear under the Subject field in the compose message window. Both of them default to On when I enter the name of someone for whom I have an ECA cert. If the person has a CAC cert, then the Lock icon appears open and I can't close it.
However, the error message you're getting suggests that maybe all your recipients haven't provided their public key to you so that you can encrypt email to them.
This ties into my comment about everything working fine in Vista/Outlook: I'm using the exact same certs and can send everyone encrypted email
Thanks,
Andreas -
Problem in sending mails to multiple recipients
Hellow ABAP gurus,
i am stuck in a problem, where cannot send the mail to multiple reciepients.
actually i am adding recipients one after another, the email address is popualted already.just tell me if i am doing anything wrong..its not giving me any error. but its not taking any users in cc:
i am new to Abap oops..so please help me n this.
the code i am using is
CALL METHOD w_document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = w_att_name
i_att_content_hex = pdf_content.
*add document to send request
send_request->set_document( w_document ).
if w_covsmtp is not initial.
*--add recipient (e-mail address
w_recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_covsmtp ). " w_addr-e_mail ).
endif.
*-- add recipient cc1 (e-mail address)
if w_cc_mail1 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail1 ). " w_addr-e_mail ).
endif.
*--add recipient cc2(e-mail address)
if w_cc_mail2 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail2 ). " w_addr-e_mail ).
endif.
*-- add recipient cc3(e-mail address)
if w_cc_mail3 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail3 ). " w_addr-e_mail ).
endif.
if w_recipient is not initial.
*--add recipient to send request
send_request->add_recipient( i_recipient = w_recipient ).
endif.
*--add recipient cc1 to send request
if w_recipient_cc1 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc1 ).
endif.
*--add recipient cc2 to send request
if w_recipient_cc2 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc2 ).
endif.
*--add recipient cc3 to send request
if w_recipient_cc3 is not initial.
send_request->add_recipient( i_recipient = w_recipient_cc3 ).
endif.
send document -
sent_to_all = send_request->send(
i_with_error_screen = c_x ).
IF sent_to_all = c_charx.
IF gv_screen_display = c_charx.
MESSAGE i022(so).
ENDIF.
w_sent = c_charx.
ENDIF.
Thanks in advance,
RohanWell, it's been a while since I have used these classes to send some email, but what about changing the order of the calls for creating internet address and adding recipient like this:
*-- add recipient cc1 (e-mail address)
if w_cc_mail1 is not initial.
w_recipient_cc1 = cl_cam_address_bcs=>create_internet_address(
i_address_string = w_cc_mail1 ). " w_addr-e_mail ).
endif.
if w_recipient is not initial.
*--add recipient to send request
send_request->add_recipient( i_recipient = w_recipient ).
endif. -
Sending mail to multiple recipients
Hello friends,
i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kindly reply. i have included sendmail->code and setproperty-> and the exact exception.
SENDMAIL
public boolean sendMail(User userObj, Message message, String content){
try{
util util=new util();
String arr[]=util.getTokens(userObj.email,",");
InternetAddress inetarr[]=new InternetAddress[arr.length];
for(int i=0;i<arr.length;i++){
inetarr=new InternetAddress(arr[i].toString());
message.setRecipients(Message.RecipientType.TO, inetarr);
MimeMultipart multipart=new MimeMultipart();
BodyPart msgBodyPart=new MimeBodyPart();
msgBodyPart.setContent(content, "text/html");
multipart.addBodyPart(msgBodyPart);
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
return true;
}catch(Exception e){
e.printStackTrace();
return false;
}//End Of The Method
GETPROPRITIES
protected Properties getProperties(){
Properties props = new Properties();
props.put("mail.smtp.starttls.enable","true");
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", adminObj.info.server[0]);
props.put("mail.smtp.port",adminObj.info.server_port[0]+"");
props.put("mail.debug","false");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.quitwait", "false");
props.put("mail.smtp.sendpartial", "true");
return props;
}//End Of The Method
Exception
javax.mail.internet.AddressException: Illegal route-addr in string ``saravana.07
@gmail.com,[email protected]''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java
:883)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:819)
at javax.mail.internet.InternetAddress.parseHeader(InternetAddress.java:
580)
at javax.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:680
at javax.mail.internet.MimeMessage.getFrom(MimeMessage.java:340)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:897)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at common.application.utilities.TenderMail.sendMail(TenderMail.java:483)
at common.application.mail.send_user_mail.__BodhiReceive(send_user_mail.
java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at jdbs.BodhiServer.callStation(Unknown Source)
at jdbs.BodhiSend.doSend(Unknown Source)
at common.application.mail.sendmail.__BodhiReceive(sendmail.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at JumpForwarder1.callStation(JumpForwarder1.java:863)
at JumpForwarder1.processRequest(JumpForwarder1.java:613)
at JumpForwarder1.authenticateUserAndExecute(JumpForwarder1.java:254)
at JumpForwarder1.doPost(JumpForwarder1.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)You seem to be splitting a string containing multiple addresses and constructing
InternetAddress objects for each entry. But looking at the address it's complaining
about, it looks like you failed to split the string properly. You might want to use the
InternetAddress.parse method that will do the splitting for you. -
Sending mail from JSP page with attachment
I have a requirement to send mail with attachment from my jsp pages, which should come to a particular mail box. Can any one help me by sending sample codes. Thankx in advance.
hi,
When request is posted you have to save file data from request to a file. you can not access the data using request.getParameter("file"). -
My email is a yahoo account. The yahoo help advises I create a group then I won't have the problem. Can I do this in Thunderbird or do I have to use yahoo?
Yes, you can define a group (such as a family) within your address book. Then you can use that group name in addressing an email.
-
Sending mail through multiple domains with iMS
I have iMS configured and working fine for multiple domains (users are
members of multiple domains). I have done this with a main email address
(main.com), and alternative email addresses to the other domains (alt1.com,
alt2.com...) so that there is one central mail location at (main.com). This
works great for receiving emails.
However, when I send email I would like to be able to show the FROM address
being from one of the alternate domains (alt1.com, alt2.com...) rather than
the main domain (main.com) sometimes. I have authentication turned on for
the sending messages, and users are logging in as ([email protected]). I assume
there is something I can add that will allow this to happen as long as a
valid address exists on my server. Any thoughts?
main domain: main.com (All mail is addressed from this domain)
alt domains: alt1.com, alt2.com...
Thanks in advance, ChrisBTW I am using iMS 5.1.
-Chris
I have iMS configured and working fine for multiple domains (users are
members of multiple domains). I have done this with a main email address
(main.com), and alternative email addresses to the other domains(alt1.com,
alt2.com...) so that there is one central mail location at (main.com).This
works great for receiving emails.
However, when I send email I would like to be able to show the FROMaddress
being from one of the alternate domains (alt1.com, alt2.com...) ratherthan
the main domain (main.com) sometimes. I have authentication turned on for
the sending messages, and users are logging in as ([email protected]). I
assume
there is something I can add that will allow this to happen as long as a
valid address exists on my server. Any thoughts?
main domain: main.com (All mail is addressed from this domain)
alt domains: alt1.com, alt2.com...
Thanks in advance, Chris -
How to send mail to multiple recipients?
Pre Mavericks, I could open contacts book, select all contacts, drag over to the BCC field in an email and hit send. Can't do it post Mavericks installation. Why?
I figured it out! Type the name of the group in the BCC field and click on it from the drop down menu. All recipients within that group appear. Hit send.
-
Can't send emails to multiple recipients any more?
Yesterday I had to send an email to some 30 other people (I only do this occasionally).
It refused to go and I received this error message:-
I have several email accounts but each one was the same.
At that time I could not even send single emails but incoming emails were unaffected.
Later in the day I received this email from my ISP mail account.
Your emails may be blocked – please confirm your alternate BT Yahoo! Mail addresses
Dear Customer,
You’ve received a ‘553’ error message because we’ve upgraded your BT Yahoo! Mail account security to help protect against ‘spoofing’ – when people use alternate email addresses to disguise the real sender, possibly to commit fraud.
What you need to do
We need you to take a few minutes to confirm each of the BT Yahoo! Mail alternate email addresses you use are genuine. If you don’t, you might get more ‘553’ error messages and have problems sending emails. Just log in and follow these simple steps. We don’t ask for any personal information.
This is rubbish and I had a similar one last year which I ignored, as the simple steps were far from simple, and the following morning all was back to normal.
So I ignored this email and tried again this morning.
I was still unable to send emails to multiple recipients but now I can send single emails OK!
Any ideas what is going on?
Is it Mail's fault or my ISP's?From the error message, it looks like there was a problem with at least one of the addresses ("NONE"). It is possible that a bad address is in the list you tried to send to.
I don't know anything about BT Internet, so I can't confirm the authenticity of the email you received.
You should be able to log into your BT account directly from the web without using any links sent in the email.
The email also seems to indicate you used an alias as the reply-to (from) email address.
You didn't mask out the username for your smtp server and it is definitely different from the from account. This may all be normal, but it does tend to match what the email is telling you. -
Mail to multiple recipients in sent mail index
When I send mail to multiple recipients (all in the "To:" field), for some reason when I view the Sent index, only the first recipient shows up. (If I open the message, I see all recipients listed.)
In Mail version 1, which I had been running on a prevoius machine with 10.2.8, all the recipients would appear in the sent mail index.
For example, let's say I email Joe, Tom, Gary. If I go to the Sent mailbox, I only see "Joe" in the "To" column. Before, I'd see "Joe, Tom, Gary."
Any way to change a setting to restore this? It makes it easier to see to whom I sent what.use string tokenizer to tokenize the string and then use this in ur smtp coding
message.addRecipients(Message.RecipientType.TO, to)
where 'message' is object of MimeMessage
and 'to' is array of Address
ex:-
Address[] to = new Address[count];
Earlier u must be using message.addRecipient(Message.RecipientType.TO, to)
where to is object of Address.
Sample code:-
suppose String posted from ur form is :-
to = "[email protected],[email protected],[email protected]"
StringTokenizer toAdd = new StringTokenizer(to,",");
Address[] address=new Address[toAdd.countTokens()];
int j=0;
while(toAdd.hasMoreTokens()){
address[j]=(new InternetAddress(toAdd.nextToken()));
j++;
}
Maybe you are looking for
-
My HP Photosmart all in one C4480 will not print from PC
I can't get my printer to print from my computer. Everything shows it's hooked up fine and ready to go. Yet when I try to print, nothing happens! Driving me crazy. Not sure if this is simply a bad printer or what. I've tried everything from unpluggin
-
Does iBooks have an up-to-the-hour spreadsheet that shows sales of our ebooks, as Amazon does? If not, how do we find out what we've sold? Or do we wait for 45 days?
-
Is there a way to stop Text box highlight animations in Yosemite
Tabbing to a text box causes a 'bouncing' highlighting of that text box. Previous OSes simply highlighted the box. Yosemite uses a 3-d effect, probably because everything is so flat? I'm sure there is a reason for this silly behavior, probably the sa
-
Little semi-transparent Finder window icons, tabs
When I move a Finder window, I sometimes accidentally grab the tab (because there's very little visual distinction between the two, poor UI IMHO). When I release the mouse, it leaves a semi-transparent icon version of the Finder window. You can liter
-
SELECT seems to ignore a space
Hi: I'm hoping someone can shed some light on this strange case. A table is being loaded from a 3-party source. One column is a 5-digit identifier. For whatever reason a space is coming in as a 6th character. Let's ignore the fact that we can fix the