Send mail with Z Message Class in me21n and me22n
Hi everyone, i'm new at the forum and this is may first post so i ask for apologies if i post it in the wrong please.
Well my question is this, i have an z class message in the NACE transaction that it's suppose to send a mail, well if i use the standard program SAPFM06P form ENTRY_NEU with a sapscript it send correctly the mail and i can display it in the SOST transaction, but i need it to display a smartform not a sapscript, so i copy the program to Z and make it call my smartform, if i go now to the me21n/me22n/me23n an make a print preview it's display my smartform correctly, to this point it's all ok, but the problem is that when i modify something in the order and save, my Z message class does not send the mail (i can't see it in the SOST transaction)
I was looking and it seems the problem is that the SOST and the SOOD table are not update but the NAST table does, so when i go to the SOST transaction it doesn't find the data to display.
I know that the update it's done in the form BUCHEN of the SAPLMEPO, but i can't find where.
Does anybody know how can i fix this problem? basically i want the me21n and me22n send the mail.
Thanks a lot
Thanks for your quick answer, I'll check and let you know any news
PD: what do you mean by "you need to maintain condition records as external send. then only it will send the mail automatically"?
Edited by: -tk85- on Jan 18, 2012 3:32 PM
Similar Messages
-
Problem sending form with fmt:message key=" " / tag system and jsp code
I have developt my new web page using jsp. I have done a booking form, please se below here. There are two pages, bookings.jsp and booking_sent.jsp. The page has 6 different languages so i have also used the <fmt:message key=" " /> tag system for each language.
The problem i have is when i send the form it opens a page where you only see all the tags, no text at all. For more information follow this link and try out the form;
http://www.neptunediving.com/neptune/general/bookings.jsp/
When you fill out the form and click send you should come to booking_sent and you do but the page is only full of tags, no text. Booking_sent looks exactly the same as bookings, except the header so why should not this work. I have tried everything but i cannot solve this problem. So i wonder if there is anybody out there who can help me with this?
BOOKINGS.JSP
<%@page import="com.neptunediving.*"%>
<%@include file="../WEB-INF/include/LangSupport.jsp"%>
<%@page contentType="text/html; charset=ISO-8859-1" language="java"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><fmt:message key="bookings.title1" /></title>
<META NAME="description" Content="<fmt:message key="bookings.description1" />
<fmt:message key="bookings.description2" />
<fmt:message key="bookings.description3" />">
<meta name="keywords" CONTENT="<fmt:message key="bookings.keywords1" />
<fmt:message key="bookings.keywords2" />
<fmt:message key="bookings.keywords3" />">
<meta name="robots" CONTENT="index, follow">
<link rel="shortcut icon" href="favicon.ico" >
<meta name="Copyright" CONTENT="Cebu Neptune Diving Adventure, Inc. Copyright (c) 1996-2007">
<meta name="Author" CONTENT="Jesper Nykvist">
<META NAME="revisit-after" CONTENT="45 days">
<META NAME="classification" CONTENT="diving">
<META NAME="classification" CONTENT="scuba">
<META NAME="classification" CONTENT="accommodation">
<META NAME="classification" CONTENT="travel">
<META NAME="classification" CONTENT="restaurants">
<META NAME="distribution" CONTENT="global">
<meta name="FreeFind" content="neverFollowScript">
<meta name="FreeFind" content="noFollowQueries">
<link href="../stylesheet/neptunediving.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="Return"></a>
<div class="pageHead">
<div align="center"><%@include
file="../WEB-INF/include/header.jsp"%></div>
</div>
<table class="nav" cellspacing="0">
<tbody>
<%@include file="../WEB-INF/include/bookings.jsp"%>
<table width="100%" height="362" cellspacing="0" class="listTable">
<tbody>
<tr class="subhead">
<td width="54%" height="31"><%@include
file="../WEB-INF/include/freefind.jsp"%></td>
<td width="46%">
<h1><span class="date"> <%@include
file="../WEB-INF/include/showtime.jsp"%> </span></h1>
</td>
</tr>
<tr>
<td height="169" colspan="2">
<h2 align="center" class="listTable"><fmt:message key="general.bookings.header1" /></h2>
<h2 align="center" class="listTable"><fmt:message key="general.bookings.header2" /></h2>
<hr />
<p align="center"><fmt:message key="general.bookings.header3" />
<fmt:message key="general.bookings.header4" />
<fmt:message key="general.bookings.header5" /></p>
<p align="center"><fmt:message key="general.bookings.header6" />
<fmt:message key="general.bookings.header7" />
<fmt:message key="general.bookings.header8" /></p>
<hr />
</td>
</tr>
<tr>
<td height="20" colspan="2">
<form id="bookings" name="bookings" method="post"
action="booking_sent.jsp">
<h2 class="newsBody"><fmt:message key="general.bookings.header9" /></h2>
<table width="100%" border="1" cellpadding="4">
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text1" /></p>
</td>
<td width="30%"><input type="text" name="from" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text2" /></p>
</td>
<td width="30%"><input type="text" name="email" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text3" /></p>
</td>
<td width="30%"><select name="region">
<option><fmt:message key="general.bookings.text4" /></option>
<option><fmt:message key="general.bookings.text5" /></option>
<option><fmt:message key="general.bookings.text6" /></option>
<option><fmt:message key="general.bookings.text7" /></option>
<option><fmt:message key="general.bookings.text8" /></option>
<option><fmt:message key="general.bookings.text9" /></option>
<option><fmt:message key="general.bookings.text10" /></option>
<option><fmt:message key="general.bookings.text11" /></option>
<option><fmt:message key="general.bookings.text12" /></option>
<option><fmt:message key="general.bookings.text13" /></option>
<option><fmt:message key="general.bookings.text14" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text15" /></p>
</td>
<td width="30%"><select name="language">
<option><fmt:message key="general.bookings.text16" /></option>
<option><fmt:message key="general.bookings.text17" /></option>
<option><fmt:message key="general.bookings.text18" /></option>
<option><fmt:message key="general.bookings.text19" /></option>
<option><fmt:message key="general.bookings.text20" /></option>
<option><fmt:message key="general.bookings.text21" /></option>
<option><fmt:message key="general.bookings.text22" /></option>
<option><fmt:message key="general.bookings.text23" /></option>
<option><fmt:message key="general.bookings.text24" /></option>
<option><fmt:message key="general.bookings.text25" /></option>
<option><fmt:message key="general.bookings.text26" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text27" />
<fmt:message key="general.bookings.text28" />
<fmt:message key="general.bookings.text29" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.bookings.text30" /><input type="radio"
name="mailing" value="Yes" />
<class="listTable"><fmt:message key="general.bookings.text31" /><input type="radio"
name="mailing" value="No" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text32" /></p>
</td>
<td width="30%"><select name="find us">
<option><fmt:message key="general.bookings.text33" /></option>
<option><fmt:message key="general.bookings.text34" /></option>
<option><fmt:message key="general.bookings.text35" /></option>
<option><fmt:message key="general.bookings.text36" /></option>
<option><fmt:message key="general.bookings.text37" /></option>
<option><fmt:message key="general.bookings.text38" /></option>
<option><fmt:message key="general.bookings.text39" /></option>
<option><fmt:message key="general.bookings.text40" /></option>
<option><fmt:message key="general.bookings.text41" /></option>
<option><fmt:message key="general.bookings.text42" /></option>
</select>
</td>
</tr>
<tr>
</table>
<br />
<h2 class="newsBody"><fmt:message key="general.bookings.text43" /></h2>
<table width="100%" border="1" cellpadding="4">
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text44" /></p>
</td>
<td width="30%"><input type="text" name="flight no, from"
size="30" maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text45" /></p>
</td>
<td width="30%"><input type="text"
name="arrival time, place" size="30" maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text46" />
<fmt:message key="general.bookings.text47" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.bookings.text48" /><input type="radio"
name="transport" value="Pick-up" />
<class ="listtable="listTable""><fmt:message key="general.bookings.text49" /><input type="radio"
name="transport" value="Bus" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text50" /></p>
</td>
<td width="30%"><input type="text" name="stay from" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text51" /></p>
</td>
<td width="30%"><input type="text" name="stay to" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text52" /></p>
</td>
<td width="30%"><input type="text" name="guests (adults)" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text53" /></p>
</td>
<td width="30%"><input type="text" name="guests (children)" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text54" /></p>
</td>
<td width="30%"><input type="text" name="rooms (fan)" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text55" /></p>
</td>
<td width="30%"><input type="text" name="rooms (air-con)" size="30"
maxlength="25" />
</td>
</tr>
<tr>
</table>
<br />
<h2 class="newsBody"><fmt:message key="general.bookings.text56" /></h2>
<table width="100%" border="1" cellpadding="4">
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text57" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.bookings.text58" /><input type="radio"
name="certified diver" value="Yes" />
<class="listTable"><fmt:message key="general.bookings.text59" /><input type="radio"
name="certified diver" value="No" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text60" />
<fmt:message key="general.bookings.text61" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.bookings.text62" /><input type="radio"
name="introductory course" value="Yes" />
<class ="listTable""><fmt:message key="general.bookings.text63" /><input type="radio"
name="introductory course" value="No" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text64" /></p>
</td>
<td width="30%"><select name="where to dive">
<option><fmt:message key="general.bookings.text65" /></option>
<option><fmt:message key="general.bookings.text66" /></option>
<option><fmt:message key="general.bookings.text67" /></option>
</select></td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text68" /></p>
</td>
<td width="30%"><select name="dive course(s)">
<option><fmt:message key="general.bookings.text69" /></option>
<option><fmt:message key="general.bookings.text70" /></option>
<option><fmt:message key="general.bookings.text71" /></option>
<option><fmt:message key="general.bookings.text72" /></option>
<option><fmt:message key="general.bookings.text73" /></option>
<option><fmt:message key="general.bookings.text74" /></option>
<option><fmt:message key="general.bookings.text75" /></option>
<option><fmt:message key="general.bookings.text76" /></option>
<option><fmt:message key="general.bookings.text77" /></option>
<option><fmt:message key="general.bookings.text78" /></option>
<option><fmt:message key="general.bookings.text79" /></option>
<option><fmt:message key="general.bookings.text80" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text81" /></p>
</td>
<td width="30%"><input type="text" name="other dive course"
size="30" maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text82" /></p>
</td>
<td width="30%"><select name="divepackage / safari">
<option><fmt:message key="general.bookings.text83" /></option>
<option><fmt:message key="general.bookings.text84" /></option>
<option><fmt:message key="general.bookings.text85" /></option>
<option><fmt:message key="general.bookings.text86" /></option>
<option><fmt:message key="general.bookings.text87" /></option>
<option><fmt:message key="general.bookings.text88" /></option>
<option><fmt:message key="general.bookings.text89" /></option>
<option><fmt:message key="general.bookings.text90" /></option>
<option><fmt:message key="general.bookings.text91" /></option>
<option><fmt:message key="general.bookings.text92" /></option>
<option><fmt:message key="general.bookings.text93" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text94" /></p>
</td>
<td width="30%"><input type="text" name="dive package or safari from" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.bookings.text95" /></p>
</td>
<td width="30%"><input type="text" name="dive package or safari to" size="30"
maxlength="25" />
</td>
</tr>
<tr>
</table>
<br />
<h2 class="newsBody"><fmt:message key="general.bookings.text96" /></h2>
<fmt:message key="general.bookings.text97" />
<fmt:message key="general.bookings.text98" />
<fmt:message key="general.bookings.text99" /></p>
<div align="left"> <textarea name="comments" cols="55" rows="10"></textarea>
<div>
<br />
<input name="Submit" type="submit" value="<fmt:message key="general.bookings.button1" />" />
<input type="reset" name="Clear form and start again..!"
value="<fmt:message key="general.bookings.button2" />" /></p>
</form>
</td>
</tr>
<tr>
<td height="29" colspan="2"><a href="#Return"><img
src='<%=URLHelper.getURL("images/arrow.gif")%>'
alt="Return to top" width="21" height="21" border="0" /></a>
<fmt:message key="general.bookings.link1" />
</td>
</tr>
<tr>
<td height="105" colspan="2">
<hr />
<div class="pageFoot">
<div align="center"><font size="-1"><b><font
size="3" face="Verdana, Arial, Helvetica, sans-serif"> <%@include
file="../WEB-INF/include/footer.jsp"%>
</div>
</td>
</tr>
</tbody>
</table>
<p><br style="clear: both;" />
</p>
</tbody>
</table>
</body>
</html>
BOOKING_SENT.JSP
<%@page import="com.neptunediving.*"%>
<%@include file="../WEB-INF/include/LangSupport.jsp"%>
<%@page contentType="text/html; charset=ISO-8859-1" language="java"%>
<%
String message;
message = "Booking";
message += "\r\nFrom: " + request.getParameter("from");
message += "\r\nEmail: " + request.getParameter("email");
message += "\r\nRegion: " + request.getParameter("region");
message += "\r\nlanguage: " + request.getParameter("language");
message += "\r\nMailing: " + request.getParameter("mailing");
message += "\r\nFind us: " + request.getParameter("find us");
message += "\r\nFlight: " + request.getParameter("flight no, from");
message += "\r\nArrival: " + request.getParameter("arrival time, place");
message += "\r\nPickup: " + request.getParameter("transport");
message += "\r\nStay from: " + request.getParameter("stay from");
message += "\r\nStay to: " + request.getParameter("stay to");
message += "\r\nAdult: " + request.getParameter("guests (adults)");
message += "\r\nChildren: " + request.getParameter("guests (children)");
message += "\r\nFan: " + request.getParameter("rooms (fan)");
message += "\r\nAir-con: " + request.getParameter("rooms (air-con)");
message += "\r\nCertification: " + request.getParameter("certified diver");
message += "\r\nIntroductory dive: " + request.getParameter("introductory course");
message += "\r\nWhere to dive: " + request.getParameter("where to dive");
message += "\r\nDive courses: " + request.getParameter("dive course(s)");
message += "\r\nOther dive course: " + request.getParameter("other dive course");
message += "\r\nDive package or safari: " + request.getParameter("divepackage / safari");
message += "\r\nDive package or safari from: " + request.getParameter("dive package or safari from");
message += "\r\nDive package or safari to: " + request.getParameter("dive package or safari to");
message += "\r\nComments: " + request.getParameter("comments");
Mailer mailer = new Mailer();
mailer.sendMail(request.getParameter("from") + "<" + request.getParameter("email") + ">",
"booking_sent",
message);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><fmt:message key="booking_sent.title1" /></title>
<META NAME="description" Content="<fmt:message key="booking_sent.description1" />
<fmt:message key="booking_sent.description2" />
<fmt:message key="booking_sent.description3" />">
<meta name="keywords" CONTENT="<fmt:message key="booking_sent.keywords1" />
<fmt:message key="booking_sent.keywords2" />
<fmt:message key="booking_sent.keywords3" />">
<meta name="robots" CONTENT="index, follow">
<link rel="shortcut icon" href="favicon.ico" >
<meta name="Copyright" CONTENT="Cebu Neptune Diving Adventure, Inc. Copyright (c) 1996-2007">
<meta name="Author" CONTENT="Jesper Nykvist">
<META NAME="revisit-after" CONTENT="45 days">
<META NAME="classification" CONTENT="diving">
<META NAME="classification" CONTENT="scuba">
<META NAME="classification" CONTENT="accommodation">
<META NAME="classification" CONTENT="travel">
<META NAME="classification" CONTENT="restaurants">
<META NAME="distribution" CONTENT="global">
<meta name="FreeFind" content="neverFollowScript">
<meta name="FreeFind" content="noFollowQueries">
<link href="../stylesheet/neptunediving.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="Return"></a>
<div class="pageHead">
<div align="center"><%@include
file="../WEB-INF/include/header.jsp"%></div>
</div>
<table class="nav" cellspacing="0">
<tbody>
<%@include file="../WEB-INF/include/bookings.jsp"%>
<table width="100%" height="362" cellspacing="0" class="listTable">
<tbody>
<tr class="subhead">
<td width="54%" height="31"><%@include
file="../WEB-INF/include/freefind.jsp"%></td>
<td width="46%">
<h1><span class="date"> <%@include
file="../WEB-INF/include/showtime.jsp"%> </span></h1>
</td>
</tr>
<tr>
<td height="169" colspan="2">
<h2 align="center" class="listTable"><fmt:message key="general.booking_sent.header1" /></h2>
<h2 align="center" class="listTable"><fmt:message key="general.booking_sent.header2" /></h2>
<hr />
<p align="center"><fmt:message key="general.booking_sent.header3" />
<fmt:message key="general.booking_sent.header4" />
<fmt:message key="general.booking_sent.header5" /></p>
<p align="center"><fmt:message key="general.booking_sent.header6" />
<fmt:message key="general.booking_sent.header7" />
<fmt:message key="general.booking_sent.header8" /></p>
<hr />
</td>
</tr>
<tr>
<td height="20" colspan="2">
<form id="bookings" name="bookings" method="post"
action="booking_sent.jsp">
<h2 class="newsBody"><fmt:message key="general.booking_sent.header9" /></h2>
<table width="100%" border="1" cellpadding="4">
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text1" /></p>
</td>
<td width="30%"><input type="text" name="from" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text2" /></p>
</td>
<td width="30%"><input type="text" name="email" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text3" /></p>
</td>
<td width="30%"><select name="region">
<option><fmt:message key="general.booking_sent.text4" /></option>
<option><fmt:message key="general.booking_sent.text5" /></option>
<option><fmt:message key="general.booking_sent.text6" /></option>
<option><fmt:message key="general.booking_sent.text7" /></option>
<option><fmt:message key="general.booking_sent.text8" /></option>
<option><fmt:message key="general.booking_sent.text9" /></option>
<option><fmt:message key="general.booking_sent.text10" /></option>
<option><fmt:message key="general.booking_sent.text11" /></option>
<option><fmt:message key="general.booking_sent.text12" /></option>
<option><fmt:message key="general.booking_sent.text13" /></option>
<option><fmt:message key="general.booking_sent.text14" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text15" /></p>
</td>
<td width="30%"><select name="language">
<option><fmt:message key="general.booking_sent.text16" /></option>
<option><fmt:message key="general.booking_sent.text17" /></option>
<option><fmt:message key="general.booking_sent.text18" /></option>
<option><fmt:message key="general.booking_sent.text19" /></option>
<option><fmt:message key="general.booking_sent.text20" /></option>
<option><fmt:message key="general.booking_sent.text21" /></option>
<option><fmt:message key="general.booking_sent.text22" /></option>
<option><fmt:message key="general.booking_sent.text23" /></option>
<option><fmt:message key="general.booking_sent.text24" /></option>
<option><fmt:message key="general.booking_sent.text25" /></option>
<option><fmt:message key="general.booking_sent.text26" /></option>
</select>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text27" />
<fmt:message key="general.booking_sent.text28" />
<fmt:message key="general.booking_sent.text29" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.booking_sent.text30" /><input type="radio"
name="mailing" value="Yes" />
<class="listTable"><fmt:message key="general.booking_sent.text31" /><input type="radio"
name="mailing" value="No" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text32" /></p>
</td>
<td width="30%"><select name="find us">
<option><fmt:message key="general.booking_sent.text33" /></option>
<option><fmt:message key="general.booking_sent.text34" /></option>
<option><fmt:message key="general.booking_sent.text35" /></option>
<option><fmt:message key="general.booking_sent.text36" /></option>
<option><fmt:message key="general.booking_sent.text37" /></option>
<option><fmt:message key="general.booking_sent.text38" /></option>
<option><fmt:message key="general.booking_sent.text39" /></option>
<option><fmt:message key="general.booking_sent.text40" /></option>
<option><fmt:message key="general.booking_sent.text41" /></option>
<option><fmt:message key="general.booking_sent.text42" /></option>
</select>
</td>
</tr>
<tr>
</table>
<br />
<h2 class="newsBody"><fmt:message key="general.booking_sent.text43" /></h2>
<table width="100%" border="1" cellpadding="4">
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text44" /></p>
</td>
<td width="30%"><input type="text" name="flight no, from"
size="30" maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text45" /></p>
</td>
<td width="30%"><input type="text"
name="arrival time, place" size="30" maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text46" />
<fmt:message key="general.booking_sent.text47" /></p>
</td>
<td width="30%">
<p class="listTable"><fmt:message key="general.booking_sent.text48" /><input type="radio"
name="transport" value="Pick-up" />
<class ="listtable="listTable""><fmt:message key="general.booking_sent.text49" /><input type="radio"
name="transport" value="Bus" checked="checked" /></p>
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text50" /></p>
</td>
<td width="30%"><input type="text" name="stay from" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text51" /></p>
</td>
<td width="30%"><input type="text" name="stay to" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text52" /></p>
</td>
<td width="30%"><input type="text" name="guests (adults)" size="30"
maxlength="25" />
</td>
</tr>
<tr>
<td width="70%">
<p class="listTable"><fmt:message key="general.booking_sent.text53" /></p>
</td>
<td width="30%"><input type="text" name="guests (children)" size="30"
maxlength="25" />
</td>
Nope, can't delete posts on this forum,
I have developed my new web page using jsp. I have done a booking form,
There are two pages, bookings.jsp and booking_sent.jsp.
The page has 6 different languages so i have also used the <fmt:message key=" " /> tag system for each language.
The problem i have is when i send the form it opens a page where you only see all the tags, no text at all.
For more information follow this link and try out the form; http://www.neptunediving.com/neptune/general/bookings.jsp/
When you fill out the form and click send you should come to booking_sent and you do but the page is only full of tags, no text. Booking_sent looks exactly the same as bookings, except the header so why should not this work. I have tried everything but i cannot solve this problem. So i wonder if there is anybody out there who can help me with this?
Tried going to that URL and got an error page served by Apache Webserver
Maybe you haven't got the correct connector going between the webserver and the application server? -
Problem in sending mail with attachment
Hi All,
I am using the function module <b>'SO_NEW_DOCUMENT_ATT_SEND_API1'</b> to send mail with attachment.
the program executes properly and shows a message <b>'Document Sent'</b>. But neither the sent mail appears in <b>'SOST'</b> nor I get it on the specified email id.
Below is my code:
<b>***</b> As attachment I am sending resume whose contents are stored in table 'ZResume' corresponding to personnel no.(pernr) and serial No.(srno).
<b>START OF PROGRAM</b>----
REPORT ZPTEST_SEND_MAIL_ATTATCHMENT.
DATA : w_name TYPE sos04-l_adr_name.
DATA: RESUME TYPE table of XSTRING with header line.
START-OF-SELECTION.
<b>* Data Declaration</b>
DATA:
l_datum(10),
ls_docdata TYPE sodocchgi1,
lt_objpack TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
lt_objhead TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_objtxt TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_objbin TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_reclist TYPE TABLE OF somlreci1 WITH HEADER LINE,
lt_listobject TYPE TABLE OF abaplist WITH HEADER LINE,
l_tab_lines TYPE i,
l_att_type LIKE soodk-objtp.
WRITE sy-datum TO l_datum.
SELECT SINGLE RESUME FROM ZRESUME INTO RESUME
WHERE PERNR EQ '00001182'
AND SRNO EQ '1'.
APPEND RESUME.
<b>* Because RESUME may be of size RAW(1000)
and objbin is of size CHAR(255) we make this table copy</b>
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
in = resume
out = lt_objbin
EXCEPTIONS
compress_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
Error in function module &1
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
<b>* Create the message and send the document.
Create Message Body</b>
<b>* Title and Description</b>
ls_docdata-obj_name = 'Resume'.
ls_docdata-obj_descr = 'Resume'.
<b>* Main Text</b>
lt_objtxt = 'Resume of the candidate' .
APPEND lt_objtxt.
<b>* Write Packing List (Main)</b>
DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
READ TABLE lt_objtxt INDEX l_tab_lines.
ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
CLEAR lt_objpack-transf_bin.
lt_objpack-head_start = 1.
lt_objpack-head_num = 0.
lt_objpack-body_start = 1.
lt_objpack-body_num = l_tab_lines.
lt_objpack-doc_type = 'RAW'.
APPEND lt_objpack.
<b>* Create Message Attachment
Write Packing List (Attachment)</b>
l_att_type = 'ALI'.
DESCRIBE TABLE lt_objbin LINES l_tab_lines.
READ TABLE lt_objbin INDEX l_tab_lines.
lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
lt_objpack-transf_bin = 'X'.
lt_objpack-head_start = 1.
lt_objpack-head_num = 0.
lt_objpack-body_start = 1.
lt_objpack-body_num = l_tab_lines.
lt_objpack-doc_type = l_att_type.
lt_objpack-obj_name = 'ATTACHMENT'.
lt_objpack-obj_descr = 'Resume'.
APPEND lt_objpack.
<b>* Create receiver list</b>
lt_reclist-receiver = '[email protected]'.
lt_reclist-rec_type = 'U'.
APPEND lt_reclist.
<b>* Send Message</b>
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = ''
TABLES
packing_list = lt_objpack
object_header = lt_objhead
contents_bin = lt_objbin
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc = 0.
Document sent
MESSAGE ID 'SO' TYPE 'S' NUMBER '022'.
ELSE.
Document <&> could not be sent
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH ls_docdata-obj_name.
ENDIF.
<b>END OF PROGRAM</b>----
Can anybody tell me where I am making mistake?
Thanks in advance,
PragyaHi Pragya,
Refer the code below. It's working fine and try to match up the things from your program.
REPORT ZSAMPL_001 .
INCLUDE ZINCLUDE_01.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
*file_open_error = 1
*file_read_error = 2
*no_batch = 3
*gui_refuse_filetransfer = 4
*invalid_type = 5
*no_authority = 6
*unknown_error = 7
*bad_data_format = 8
*header_not_allowed = 9
*separator_not_allowed = 10
*header_too_long = 11
*unknown_dp_error = 12
*access_denied = 13
*dp_out_of_memory = 14
*disk_full = 15
*dp_timeout = 16
*OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
***INCLUDE ZINCLUDE_01 .
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
tables crmrfcpar.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
data v_rfcdest LIKE crmrfcpar-rfcdest.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
FORM
FORM ml_saveforbp USING jobname jobcount.
Data
*data : yhead like yhrt_bp_head.
*DATA : ydocdata LIKE yhrt_bp_docdata,
*yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
*yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
*DATA : seqnr TYPE i.
Head
*yhead-jobname = jobname.
*yhead-jobcount = jobcount..
*MODIFY yhrt_bp_head FROM yhead.
Doc Data
*ydocdata-jobname = jobname.
*ydocdata-jobcount = jobcount.
*MOVE-CORRESPONDING docdata TO ydocdata.
*MODIFY yhrt_bp_docdata FROM ydocdata.
Objtxt
*seqnr = 0.
*LOOP AT objtxt.
*seqnr = seqnr + 1.
*yobjtxt-jobname = jobname.
*yobjtxt-jobcount = jobcount.
*yobjtxt-seqnr = seqnr.
*MOVE-CORRESPONDING objtxt TO yobjtxt.
*MODIFY yhrt_bp_objtxt FROM yobjtxt.
*ENDLOOP.
RecList
*seqnr = 0.
*LOOP AT reclist.
*seqnr = seqnr + 1.
*yreclist-jobname = jobname.
*yreclist-jobcount = jobcount.
*yreclist-seqnr = seqnr.
*MOVE-CORRESPONDING reclist TO yreclist.
*MODIFY yhrt_bp_reclist FROM yreclist.
*ENDLOOP.
ENDFORM. "ml_saveforbp
FORM
FORM ml_fetchfrombp USING jobname jobcount.
*CLEAR docdata.
*REFRESH objtxt.
*REFRESH reclist.
*SELECT SINGLE * FROM yhrt_bp_docdata
*INTO corresponding fields of docdata
*WHERE jobname = jobname
*AND jobcount = jobcount.
*SELECT * FROM yhrt_bp_objtxt
*INTO corresponding fields of TABLE objtxt
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
*SELECT * FROM yhrt_bp_reclist
*INTO corresponding fields of TABLE reclist
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
ENDFORM. "ml_fetchfrombp
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra -
Sending mail with multiple attachments
hi.I wrote a code to send mail.but i need to send mail with multiple attachments.here is the code i wrote.what should i do to send the mail with multiple attachments.if i run this code iam able to send mails but not attachments.please help me
<%@ page import="javax.mail.*,javax.mail.internet.*,java.util.Date,java.io.*,java.net.InetAddress,java.sql.*,java.util.Properties,java.net.*,javax.sql.*,javax.activation.*,java.util.*,java.text.*" %>
<%@ page import="java.io.*,java.sql.*,java.net.*,java.util.*,java.text.*" %>
<%
String Attachfiles1="";
String Attachfiles2="";
String Attachfiles3="";
if("Send".equalsIgnoreCase("send"))
try
String subject="",from="",url = null,to="";
String mailhost = "our local host";
Properties props = System.getProperties();
String msg_txt="";
String strStatus="";
// byte[] bin=.....;
//Adds Attechment:
Multipart multipart = new MimeMultipart();
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText("Here are my attachments");
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
//first attachment
DataSource source = new FileDataSource("C:\\img1.jpg");
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName("C:\\Telnor1.jpg");
multipart.addBodyPart(messageBodyPart);
//Second attachment
DataSource source2 = new FileDataSource("C:\\img2.jpg");
messageBodyPart.setDataHandler(new DataHandler(source2));
messageBodyPart.setFileName("C:\\Telnor2.jpg");
multipart.addBodyPart(messageBodyPart);
//etc...
message.setContent(multipart);
Transport.send( message );
String mailer = "MyMailerProgram";
to=request.getParameter("to");
from=request.getParameter("from");
subject=request.getParameter("subject");
msg_txt=request.getParameter("message");
props.put("mail.smtp.host", mailhost);
Session mailsession = Session.getDefaultInstance(props, null);
Message message = new MimeMessage(mailsession);
message.setFrom(new InternetAddress(from));
message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
message.setSubject(subject);
message.setHeader("X-Mailer", mailer);
message.setSentDate(new Date());
message.setText(msg_txt);
BodyPart messageBodyPart = new MimeBodyPart();
BodyPart messageBodyPart2 = new MimeBodyPart();
Multipart multipart = new MimeMultipart(); // to add many part to your messge
messageBodyPart = new MimeBodyPart();
javax.activation.DataSource source = new javax.activation.FileDataSource("path of the file");
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName("file_name");
messageBodyPart2.setText("message"); // set the txt message
multipart.addBodyPart(messageBodyPart);
multipart.addBodyPart(messageBodyPart2);
Transport.send(message);
out.println("Message Sent");
catch (Exception e)
e.printStackTrace();
if("Attachfiles".equalsIgnoreCase("attachfiles"))
Attachfiles1=request.getParameter("fieldname1");
Attachfiles2=request.getParameter("fieldname2");
Attachfiles3=request.getParameter("fieldname3");
%>
<html>
<body>
<div class="frame">
<form action="Composemail.jsp" method="post">
<b>SelectPosition:</b> <select name="cars" >
<option value="ABAP">ABAP
<option value="saab">Saab
<option value="fiat">Fiat
<option value="audi">Audi
</select><br><br>
<table border="1" cellpadding="2" cellspacing="2">
<tr><th>Name</th>
<th>EmailId</th>
<th>ContactNumber</th>
<th>Position</th>
</tr>
<tr>
<td>
</td>
</tr>
</table><br>
<b>SelectUser :</b><select name="cars">
<option value="Administrator">Administrator
<option value="saab">Saab
<option value="fiat">Fiat
<option value="audi">Audi
</select>
<br>
<b>To :</b>           <input type="text" name="to" size="72"><br>
<b>From :</b>       <input type="text" name="from" size="72"><br>
<b>Subject :</b>   <input type="text" name="subject" size="72"><br>
<%=Attachfiles1%><br><%=Attachfiles2%><br><%=Attachfiles3%><br><br>
<b>Message:</b><br>
            <textarea rows="10" cols="50" name="message">
</textarea> <br><br>
<b>AttachedFile:</b> <input type="file" name="fieldname1" value="filename" size="50"><br><br>
<b>AttachedFile:</b> <input type="file" name="fieldname2" value="filename" size="50"><br><br>
<b>AttachedFile:</b> <input type="file" name="fieldname3" value="filename" size="50"><br><br>
            <input type="submit" name="attachfiles" value="Attachfiles">
<center>
<input type="submit" name="send" value="Send" >
</center>
</form>
</div>
</body>
</html>Create a separate MimeBodyPart object for each attachment, rather than reusing
the same one over and over. -
Problem in Sending mail with attachment (Excel sheet)
Hi
Iam using this FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending mail with an attachment (excel sheet).
the application is running fine , mail is going to other system . but the excel sheet attachment contain only few rows not all.
and the body of the mail is not displaying .
Can any one help me. Thanks in advance.Hi,
you can use cl_bcs classes for the same. I am using below code for same thng
CONSTANTS:c_tab TYPE c VALUE cl_bcs_convert=>gc_tab.
CONSTANTS:c_crlf TYPE c VALUE cl_bcs_convert=>gc_crlf.
DATA o_send_request TYPE REF TO cl_bcs.
DATA o_document TYPE REF TO cl_document_bcs.
DATA o_recipient TYPE REF TO if_recipient_bcs.
DATA o_bcs_exception TYPE REF TO cx_bcs.
TRY.
o_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = is_mail_text
i_subject = text-005 ).
ENDTRY.
*create file header
CONCATENATE
text-h00 c_tab text-h01 c_tab text-h02 c_tab text-h03 c_tab text-h04 c_tab
text-h52 c_tab text-h05 c_tab text-h06 c_tab text-h07 c_tab text-h08 c_tab text-h09 c_tab
c_crlf INTO w_data_string.
Loop at itab which contains data to be send as attachment
concatenate field1 field2 field3 c_crlf into your_string separated by c_tab
conatenate final string your_string into final_string.
endloop.
*Convert data into suitable excel format
TRY.
CALL METHOD cl_bcs_convert=>string_to_solix
EXPORTING
iv_string = w_data_string
iv_codepage = '4103'
iv_add_bom = 'X'
IMPORTING
et_solix = w_binary_content.
CATCH cx_bcs INTO o_bcs_exception.
IF o_bcs_exception IS NOT INITIAL.
w_exec_txt = o_bcs_exception->get_text( ).
MESSAGE w_exec_txt TYPE 'S'.
ENDIF.
ENDTRY.
add the spread sheet as attachment to document object
CONCATENATE text-006 sy-datum INTO w_attach_name SEPARATED BY space.
o_document->add_attachment(
i_attachment_type = 'xls'
i_attachment_subject = w_attach_name
i_att_content_hex = w_binary_content ).
*create persistent send request
o_send_request = cl_bcs=>create_persistent( ).
add document object to send request
o_send_request->set_document( o_document ).
create recipient object for external mail id
w_mlrec = iw_recipent.
TRY.
o_recipient = cl_distributionlist_bcs=>getu_persistent(
i_dliname = w_mlrec
i_private = space ).
CATCH cx_bcs INTO o_bcs_exception.
IF o_bcs_exception IS NOT INITIAL.
w_exec_txt = o_bcs_exception->get_text( ).
MESSAGE w_exec_txt TYPE 'S'.
ENDIF.
ENDTRY.
add recipient object to send request
o_send_request->add_recipient( o_recipient ).
---------- send document ---------------------------------------
w_sent_to_all = o_send_request->send( i_with_error_screen = 'X' ).
IF w_sent_to_all EQ abap_true.
COMMIT WORK.
ENDIF. -
Sending mail with multiple attachment
hi.
i want to send mail with multiple attachment.
i m succeed in sending multiple attachment but the second pdf is not open.
its given error like "This file is damaged and could not be open.
pls check my code. and
give the solution....
point should be assured...........
hope all u r understand my problem..
& tell me where is i m missing something.
REPORT YSDPASALE1_MAIL LINE-SIZE 110.
data : year_month(6) type c.
data : from_date like sy-datum,to_date like sy-datum.
INITIALIZATION.
year_month = sy-datum+0(6).
CONCATENATE year_month '01' into from_date.
to_date = sy-datum.
ranges : temp for mkpf-budat.
temp-low = from_date.
temp-high = to_date.
append temp to temp.
DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
jobname like TBTCJOB-JOBNAME,
L_RELEASE(1) TYPE c.
CONSTANTS : l_c_device(4) VALUE 'LOCL'.
DATA : t type i value 0.
DATA : p_email1 like somlreci1-receiver,
p_sender LIKE somlreci1-receiver.
Data Declaration
DATA: gd_recsize TYPE i,gd_recsize1 TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att2 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_desc1 TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des,
gd_mtitle LIKE sodocchgi1-obj_descr.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
DATA: BEGIN OF mailstr OCCURS 0,
p_email like somlreci1-receiver,
END OF mailstr.
DATA: mailtab like STANDARD TABLE OF mailstr WITH HEADER LINE.
DATA: ypp18tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ymis008tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ysd15tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
ymis10tab like STANDARD TABLE OF mailstr WITH HEADER LINE.
SUBMIT YSDPASALE1 with bdt in temp
to sap-spool
with line-size = '255'
with KEEP_IN_SPOOL = 'X'
with IMMEDIATELY = ' '
WITHOUT SPOOL DYNPRO
AND RETURN
NEW-PAGE PRINT ON
DESTINATION l_c_device
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf.
select yemail as p_email into CORRESPONDING FIELDS OF TABLE ymis008tab
from ymail
where ytcode = 'YMIS008'.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
'request to be created.'.
ENDIF.
wait up to 3 seconds.
submit YSD_MONTHLY_SALES
USING SELECTION-SET 'MAIL'
to sap-spool
with KEEP_IN_SPOOL = 'X'
with IMMEDIATELY = ' ' "SPACE
WITHOUT SPOOL DYNPRO
AND RETURN
NEW-PAGE PRINT ON
DESTINATION l_c_device
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
new-page print off.
IF sy-batch EQ 'X'.
gd_attachment_desc1 = 'YMIS10'.
gd_mtitle = 'Monthly Sales Report'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
PERFORM convert_spool_to_pdf1.
loop at it_mess_att.
move it_mess_att1 to it_mess_att.
APPEND it_mess_att.
endloop.
APPEND LINES OF it_mess_att1 to it_mess_att.
free it_mess_att1.
it_mess_att[] = it_mess_att1[].
insert LINES OF it_mess_att1 into it_mess_att.
APPEND LINES OF it_mess_att2 to it_mess_att .
insert LINES OF it_mess_att1 into it_mess_att.
insert LINES OF it_mess_att2 into it_mess_att.
loop at ymis008tab into mailstr.
p_email1 = mailstr-p_email.
p_email1 = '[email protected]'.
PERFORM process_email.
endloop.
clear mailstr.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ELSE.
SKIP.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM convert_spool_to_pdf1.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att1 = gd_buffer.
APPEND it_mess_att1.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
DESCRIBE TABLE it_mess_att1 LINES gd_recsize1.
CHECK gd_recsize > 0 or gd_recsize1 > 0.
PERFORM send_email." USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email." USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = gd_attachment_desc1 .
gd_attachment_desc = 'YPP18 - Daily Highlights'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Dear Sir,'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'kindly find the attached document'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'Do not reply on this mail, It is generated from SAP'.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = ' '.
APPEND it_mess_bod.
it_mess_bod = 'Regards,'.
APPEND it_mess_bod.
it_mess_bod = 'Arpit Shah'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
it_mess_att1
using "p_email
gd_mtitle
'Testing mail generated from SAP'
'Daily Highlights Abstract Report - YPP18'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
it_attach1
using "p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1,w_doc_data1 like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data1-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
For 2nd Attachments
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach1 INDEX w_cnt.
w_doc_data-doc_size = w_doc_data1-doc_size +
( w_cnt - 1 ) * 255 + STRLEN( it_attach1 ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
APPEND LINES OF it_attach1 to t_attachment.
t_attachment[] = it_attach1[].
APPEND LINES OF it_attach1 to t_attachment.
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
DESCRIBE TABLE it_attach LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS008'."ld_attdescription.
t_packing_list-obj_name = 'YMIS008'."ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
clear t_packing_list.
for 2 attachments
data : a type i,b type i.
a = t_packing_list-body_num.
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = a + 1. "1
DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
DESCRIBE TABLE it_attach1 LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS10'."ld_attdescription.
t_packing_list-obj_name = 'YMIS10'."ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
a = t_packing_list-body_num.
clear t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = a + 1.
t_packing_list-body_num = t_packing_list-body_num + 1.
DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
t_packing_list-body_num = a + t_packing_list-body_num .
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = 'YMIS10'."ld_attdescription.
t_packing_list-obj_name = 'YMIS10'."ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
loop at ymis008tab into mailstr.
t_receivers-receiver = mailstr-p_email. "ld_email.
t_receivers-receiver = p_email1.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'. "X "Read Acknoledgement
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
endloop.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Rgds.
ArpitHi Arpit,
Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
Regards,
John. -
How to send mail with attachments - ALBPM 5.7
Hi All,
I am new to BPM,
Someone could help giving me a example of Send Mail with attachments in Aqualogic Studio 5.7?
thanks,
Renatanombrefichero="C:\\Temp\\test.doc"
subject as String="Subject"
message as String="Message"
mailAttachment = Fuego.Net.MailAttachment(source : BinaryFile.readToBinaryFrom(name : nombrefichero), fileName : "test2.doc")
mailAttachments[0] = mailAttachment
correo as Mail
correo.attachments = mailAttachments
correo.contentType = "text/html"
send correo
using from = "[email protected]",
recipient = "[email protected]",
subject = subject,
message = message -
Sending mail with excel attachment-improper format
Dear experts,
I am sending a mail to outlook with an excel attachment. The mail is sent with attachment and the data, but all in one cell.
I am using SO_NEW_DOCUMENT_ATT_SEND_API1. What parameters do i need to manipulate to have data in different columns of excel? I am using "packing_list" table of FM. But dont know the exact parameters to be passed. Can anyone help with the same please?
Best regards and thanks!
Sumit Nene.Hello Sumit,
I am using same function module to send mail with excel attachment.
Below I am attaching my own code for your reference.
Data which u want to add in excel file is maintain in IT_OBJBIN i.e. document information.
CLEAR :IMESSAGE,IT_OBJBIN,IT_OBJPACK,IT_RECLIST.
REFRESH: IMESSAGE[ ] , IT_OBJBIN[ ] , IT_OBJPACK[ ] , IT_RECLIST[ ].
" populate the text for body of the mail
CLEAR WA_IMESSAGE.
CONCATENATE 'Board : ' P_BOARD ':' 'Please find the excel attached for the list of Material whose routing is created' INTO WA_IMESSAGE-LINE.
APPEND WA_IMESSAGE TO IMESSAGE.
"document information
W_DOC_CHNG-OBJ_NAME = 'Excel'.
IF NOT P_BOARD IS INITIAL.
CONCATENATE 'Board : ' P_BOARD ':' 'List Of Routing Materials' INTO W_DOC_CHNG-OBJ_DESCR.
ELSE.
CONCATENATE 'List Of' ' Routing Materials' INTO W_DOC_CHNG-OBJ_DESCR.
ENDIF.
W_DOC_CHNG-SENSITIVTY = 'F'. " ->Functional object
" displaying material , plant in the excel
CONCATENATE 'BOARD NO : ' P_BOARD INTO WA_OBJBIN.
APPEND WA_OBJBIN TO IT_OBJBIN.
CONCATENATE 'MATERIAL' 'PLANT' 'DESCRIPTION' INTO WA_OBJBIN SEPARATED BY C_TAB.
CONCATENATE C_RET WA_OBJBIN INTO WA_OBJBIN.
APPEND WA_OBJBIN TO IT_OBJBIN.
CLEAR : WA_OBJBIN.
LOOP AT IT_DOWNLOAD INTO WA_DOWNLOAD. "It_orders is the internal table to be transferred to excel
CONCATENATE WA_DOWNLOAD-MATNR WA_DOWNLOAD-WERKS WA_DOWNLOAD-DESC INTO WA_OBJBIN SEPARATED BY C_TAB.
CONCATENATE C_RET WA_OBJBIN INTO WA_OBJBIN.
APPEND WA_OBJBIN TO IT_OBJBIN.
ENDLOOP.
DESCRIBE TABLE IT_OBJBIN LINES V_LINES_BIN. " no of lines for excel data
" pack the data as RAW
CLEAR WA_IT_OBJPACK-TRANSF_BIN. "Obj. to be transported not in binary form
WA_IT_OBJPACK-HEAD_START = 1. "Start line of object header in transport packet
WA_IT_OBJPACK-HEAD_NUM = 0. "Number of lines of an object header in object packet
WA_IT_OBJPACK-BODY_START = 1. "Start line of object contents in an object packet
WA_IT_OBJPACK-BODY_NUM = MESSAGE_LINES. "Number of lines of the mail body
WA_IT_OBJPACK-DOC_TYPE = 'RAW'.
APPEND WA_IT_OBJPACK TO IT_OBJPACK.
" pack the data as excel
WA_IT_OBJPACK-TRANSF_BIN = 'X'.
WA_IT_OBJPACK-HEAD_START = 1.
WA_IT_OBJPACK-HEAD_NUM = 1.
WA_IT_OBJPACK-BODY_START = 1.
WA_IT_OBJPACK-BODY_NUM = V_LINES_BIN. "no of lines of it_orders to give no of unprocessed orders
WA_IT_OBJPACK-DOC_TYPE = 'XLS'. " -> excel fomat
WA_IT_OBJPACK-OBJ_NAME = 'EXCEL ATTACHMENT'.
" attachment name
IF NOT P_BOARD IS INITIAL.
CONCATENATE P_BOARD '.XLS' INTO WA_IT_OBJPACK-OBJ_DESCR.
ELSE.
CONCATENATE 'LIST' '.XLS' INTO WA_IT_OBJPACK-OBJ_DESCR.
ENDIF.
WA_IT_OBJPACK-DOC_SIZE = V_LINES_BIN * 255.
APPEND WA_IT_OBJPACK TO IT_OBJPACK.
" creating email id
DATA: STR1 TYPE STRING,
STR2 TYPE STRING,
STR3 TYPE STRING,
ITAB TYPE TABLE OF STRING.
DATA : WA_I LIKE LINE OF ITAB.
SPLIT P_EMAIL AT ',' INTO: TABLE ITAB.
e-mail receivers.
CLEAR WA_IT_RECLIST.
LOOP AT ITAB INTO WA_I.
WA_IT_RECLIST-RECEIVER = WA_I.
WA_IT_RECLIST-RECEIVER = V_MAILADDR.
WA_IT_RECLIST-EXPRESS = 'X'.
WA_IT_RECLIST-REC_TYPE = 'U'. "-> Internet address
APPEND WA_IT_RECLIST TO IT_RECLIST.
CLEAR WA_IT_RECLIST.
ENDLOOP.
" sending mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = IT_OBJPACK
OBJECT_HEADER =
CONTENTS_BIN = IT_OBJBIN
CONTENTS_TXT = IMESSAGE
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = IT_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
COMMIT WORK.
IF SY-SUBRC = 0.
MESSAGE I001 WITH 'Routing is Created for Board' P_BOARD 'and Mail send on e-mail id :' P_EMAIL.
ENDIF. -
Can´t send mail with 3g
I have problem with my outgoing server.
I have 3 outgoing servers:
Primary: mail1.comhem.se
Secundary servers: mailout.telia.com
smtprelay1.telia.com
It works well sending mails with Wifi but as soon it goes to 3g it doesn´t work any longer, and these messages pops up saying that address is not valid or connection timeout.
But as soon as it get back to Wifi, swoosch and away it goes!
What can be wrong? Have I missed something in the setup?
Receiving mail are no problem with 3g.When I used mobile-smtp.roadrunner.com it failed to send. It put the message in the Outbox and said the sender address [email protected] was rejected by the server.
I think that's because my roadrunner email is on the cinci.rr.com server and not the roadrunner.com server
I had it set up:
mobile-smtp.roadrunner.com
SSL off
Authentication: Password checked
server port 587 <-----note it wouldn't accept 597 here. The 587 port is there in all mail servers once they verify
In order for my mail to work with AT&T's network, I had to make their server the Primary:
Primary Server: cwmx.com
SSL off
Server Port 25
Authentication" Password checked
I've tried all these below as Secondary servers
smtp-server.cinci.rr.com
SSL off
Authentication: Password checked
server port 587
smtp-server.roadrunner.com
SSL off
Authentication: Password checked
server port 587
mobile-smtp.roadrunner.com
SSL off
Authentication: Password checked
server port 587 -
Convert Screen(spool) to PDF file sending mail with attach file
Hi :
I'd like convert spool list to pdf and sending file...
so, I read thread about spool convert to PDF before,
and know how to convert Spool to PDF file and send mail with attach file.
but I have a problem.
my solution as:
step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
I want to showing word is wider that 255.
and then I find a manual method as:
After program finished.
Function Menu -> system -> List -> Send
use Prog: "Create Document and Send"
I use this prog sending mail and attached file ,
PDF file do <b>NOT</b> have 255 word limit !
finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
which Function I have to use?...
Please help me, Thanks!Hi,
Check this sample code of sending spool as attachment to an email address..
Parameters.
PARAMETERS: p_email(50) LOWER CASE.
PARAMETERS: p_spool LIKE tsp01-rqident.
Data declarations.
DATA: plist LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: document_data LIKE sodocchgi1.
DATA: so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
DATA: real_type LIKE soodk-objtp.
DATA: sp_lang LIKE tst01-dlang.
DATA: line_size TYPE i VALUE 255.
DATA: v_name LIKE soextreci1-receiver.
DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
Get the spool data.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = p_spool
first_line = 1
last_line = 0
desired_type = ' '
IMPORTING
real_type = real_type
sp_lang = sp_lang
TABLES
buffer = so_ali
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Error'.
LEAVE LIST-PROCESSING.
ENDIF.
Prepare the data.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 0.
plist-body_num = 0.
plist-doc_type = 'RAW'.
plist-obj_descr = 'Test ALV'.
APPEND plist.
plist-transf_bin = 'X'.
plist-head_start = 0.
plist-head_num = 0.
plist-body_start = 1.
DESCRIBE TABLE so_ali LINES plist-body_num.
plist-doc_type = real_type.
Get the size.
READ TABLE so_ali INDEX plist-body_num.
plist-doc_size = ( plist-body_num - 1 ) * line_size
+ STRLEN( so_ali ).
APPEND plist.
Move the receiver address.
MOVE: p_email TO rec_tab-receiver,
'U' TO rec_tab-rec_type.
APPEND rec_tab.
IF NOT sp_lang IS INITIAL.
document_data-obj_langu = sp_lang.
ELSE.
document_data-obj_langu = sy-langu.
ENDIF.
v_name = sy-uname.
Send the email.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
sender_address = v_name
sender_address_type = 'B'
TABLES
packing_list = plist
contents_bin = so_ali
receivers = rec_tab
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE e208(00) WITH 'Error'.
ENDIF.
COMMIT WORK.
Send the email immediately.
SUBMIT rsconn01
WITH mode = 'INT'
AND RETURN.
Thanks,
Naren -
Send mail with correct encoding
pleace, can somebody tell me how to create a correct procedure to send mail with central europe signs?
i use
Procedure MailToOwner as
BEGIN
UTL_MAIL.send( sender => [email protected],
recipients => [email protected],
subject => 'subject',
message => ' text with central europe signs like ščř '|| ReturnCountDay,
priority => 3,
mime_type => 'text/plain; charset=windows-1250'
END MailToOwner;
my problem is that the mail dont show the message correct.
my second problem how i can send html message with this function?
changing mime_type => 'text/html; charset=windows-1250' didnt help me.
the mail still show me the html code as a text message.
thanks for any suggestion.
juraafter using
message => utl_raw.cast_to_raw ('UPOZORNENI: Platnost trial verze produktu u zakaznika vyprší') || ReturnPocetDni || utl_raw.cast_to_raw (' dni. '),
i recieved mail containing
X-Priority: 3
Content-Type: multipart/mixed;
boundary="------------4D8C24=_23F7E4A13B2357B3"
This is a multi-part message in MIME format.
--------------4D8C24=_23F7E4A13B2357B3
Content-Type: text/plain; charset=windows-1250
Content-Transfer-Encoding: quoted-printable
55504F5A4F524E454E493A20506C61746E6F737420747269616C207665727A652070726F647=
56B7475205333506F7274616C206D616E616765722075207A616B617A6E696B6120Mikro=
s.20767970727369207A6120-1020646E692E20 -
RE: Can't send mail with iCloud from Mac
OK so you have made everyone using a mobileme account switch to iCloud- I still use the mail icon on my Macbook Pro and every now and then
the server quits and does not allow me to send emails. I run the server doctor and only my address gets the green light. The smtp.me.com: my username
is always red. I have checked my user name and made sure my password is correct and still I m locked out of sending emails. I have time sensitive work that I need to send it to clients and there is nothing more frustrating than having to tell a client, I can't send an email right now. What can be done for this.
Here is what the details have to say:
CONNECTED Nov 15 22:11:25.456 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
CONNECTED Nov 15 22:11:25.501 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd63276c70
READ Nov 15 22:11:25.554 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
220 asmtpout026.mac.com -- Server ESMTP (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011))
WROTE Nov 15 22:11:25.584 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
EHLO [10.0.1.4]
READ Nov 15 22:11:25.687 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
250-asmtpout026.mac.com
250-8BITMIME
250-PIPELINING
250-CHUNKING
250-DSN
250-ENHANCEDSTATUSCODES
250-EXPN
250-HELP
250-XADR
250-XSTA
250-XCIR
250-XGEN
250-XLOOP 29D2C3CB10528E4A901ADA1FF9173EF9
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=LOGIN PLAIN
250-ETRN
250-NO-SOLICITING
250 SIZE 0
WROTE Nov 15 22:11:25.691 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
STARTTLS
READ Nov 15 22:11:25.746 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd63276c70
* OK iSCREAM ready to rumble (1F4302+:16701)
WROTE Nov 15 22:11:25.752 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd631545b0
1.33 CAPABILITY
READ Nov 15 22:11:25.804 [kCFStreamSocketSecurityLevelNone] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
220 2.5.0 Go ahead with TLS negotiation.
READ Nov 15 22:11:25.825 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd631545b0
* CAPABILITY st11p00mm-iscream017.mac.com 1F4302+ XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN
1.33 OK !!
WROTE Nov 15 22:11:25.985 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd631545b0
2.33 AUTHENTICATE ATOKEN MjA0MzExOTMyADIwNDMxMTkzMgBBUUFBQUFCT3d6ZnQ0RVlrUDZ3V3c4TVZYcFQwK1NicDBIY2FvVkE 9
WROTE Nov 15 22:11:26.196 [kCFStreamSocketSecurityLevelTLSv1SSLv3] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
EHLO [10.0.1.4]
READ Nov 15 22:11:26.302 [kCFStreamSocketSecurityLevelTLSv1SSLv3] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
250-asmtpout026.mac.com
250-8BITMIME
250-PIPELINING
250-CHUNKING
250-DSN
250-ENHANCEDSTATUSCODES
250-EXPN
250-HELP
250-XADR
250-XSTA
250-XCIR
250-XGEN
250-XLOOP 29D2C3CB10528E4A901ADA1FF9173EF9
250-AUTH PLAIN LOGIN
250-AUTH=LOGIN PLAIN
250-ETRN
250-NO-SOLICITING
250 SIZE 0
WROTE Nov 15 22:11:26.309 [kCFStreamSocketSecurityLevelTLSv1SSLv3] -- host:smtp.me.com -- port:25 -- socket:0x7fdd620ef180 -- thread:0x7fdd6218a0e0
QUIT
READ Nov 15 22:11:26.522 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd631545b0
2.33 OK User adnohcs logged in 335182
WROTE Nov 15 22:11:26.529 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
3.33 CAPABILITY
READ Nov 15 22:11:26.697 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
* CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES CONDSTORE ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 ID IDLE
3.33 OK Completed
WROTE Nov 15 22:11:26.706 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
4.33 ID ("name" "Mac OS X Mail" "version" "5.1 (1251.1)" "os" "Mac OS X" "os-version" "10.7.2 (11C74)" "vendor" "Apple Inc.")
READ Nov 15 22:11:26.912 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
* ID NIL
4.33 OK Completed
WROTE Nov 15 22:11:26.920 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
5.33 LIST "" ""
READ Nov 15 22:11:27.093 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
* LIST (\Noselect) "/" ""
5.33 OK Completed
WROTE Nov 15 22:11:27.103 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd621df3b0 -- thread:0x7fdd6218a0e0
6.33 LOGOUT
CONNECTED Nov 15 22:12:20.509 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd61f36ff0
READ Nov 15 22:12:20.724 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd61f36ff0
* OK iSCREAM ready to rumble (1F4302+:31530)
WROTE Nov 15 22:12:20.734 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
1.34 CAPABILITY
READ Nov 15 22:12:20.796 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
* CAPABILITY st11p00mm-iscream023.mac.com 1F4302+ XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN
READ Nov 15 22:12:20.804 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
1.34 OK !!
WROTE Nov 15 22:12:20.978 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd6227e390
2.34 AUTHENTICATE ATOKEN MjA0MzExOTMyADIwNDMxMTkzMgBBUUFBQUFCT3d6ZnQ0RVlrUDZ3V3c4TVZYcFQwK1NicDBIY2FvVkE 9
READ Nov 15 22:12:21.493 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd6227e390
2.34 OK User adnohcs logged in 335037
WROTE Nov 15 22:12:21.503 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
3.34 CAPABILITY
READ Nov 15 22:12:21.658 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
* CAPABILITY XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES CONDSTORE ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCHRES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 ID IDLE
3.34 OK Completed
WROTE Nov 15 22:12:21.670 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623b1870
4.34 ID ("name" "Mac OS X Mail" "version" "5.1 (1251.1)" "os" "Mac OS X" "os-version" "10.7.2 (11C74)" "vendor" "Apple Inc.")
READ Nov 15 22:12:21.815 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623b1870
* ID NIL
4.34 OK Completed
WROTE Nov 15 22:12:21.826 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
5.34 LIST "" ""
READ Nov 15 22:12:22.060 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
* LIST (\Noselect) "/" ""
5.34 OK Completed
WROTE Nov 15 22:12:22.073 [kCFStreamSocketSecurityLevelNegotiatedSSL] -- host:p99-imap.mail.me.com -- port:993 -- socket:0x7fdd6330d8d0 -- thread:0x7fdd623e2220
6.34 LOGOUT
maybe you can figure out why I can't send any email and possibly help me to fix the problem. I m not a fan of iCloud it has been nothing but a headache and I am tired of having to put my clients off. I am loosing money thanks to all of this.
Sweeney GraphicsIt's a bad idea to post your email address - it's an invitation to spam - and I've aasked the Hosts to remove it.
The first thing to try would be to sign out in System Preferences>iCloud, then sign back in again and check 'Mail' and any other data types you need in the list. This will set Mail up, hopefully correctly.
If you are still having problems accessing or sending mail go to http://appleid.apple.com and change your password, making sure that it complies with Apple's requirements: at least eight characters, of which at least one must be a numeral and one a capital letter.
Note that iCloud does not interact with any other email service. You cannot use it to check other email accounts, and you cannot send using its smtp server with any address other than your @me.com one as the 'From' address.
You should be able to set up other accounts separately in the Mail application: these would be unaffected by iCloud in any way. -
I cannot send mail with my ipod touch using my icloud account
I'm just posting this as I did for all these threads for the same issue:
Ok I think this problem here is Apple... It's a DNS problem. You get this problem depending on what smtp server you are registered on.
I always get the message that "p06-smtp.mail.me.com" failed...
But according to the nslookup command there are only the servers "p01, p02, p03, p04"... no p05 and p06 or p07 and p08 ...
What I did to get it to work (only considered as workaround):
first I tried to add a second SMTP server with the address "smtp.mail.me.com", it seemed that the mail went through... but never arrived... then I configured "p01-smtp.mail.me.com" as second server and it worked!!
What is the problem with this workaround?
When you change the password! As it doesn't accept the Apple Token you must configure your Apple ID credentials manually... however when you change them, you have also to change the manually configured second SMTP server! -
Hi,
I have two different IMAP accounts, and I can't send mail with either of them. I receive it just fine, but can't send. One of them just switched to ESMTP (I'm not entirely sure what that means), and said that many mail programs are not yet compatible with it. I know that both accounts can send, as I can send from them on the web.
I have tried switching from port 25 to port 587, with no luck. Regardless of what I do, the program displays a window saying, "Sending the message content to the server failed." I haven't been able to send for a little over a week now. Any help would be greatly appreciated.
ThanksTonight I have been suddenly unable to send e-mail from my mac.com address.
The problem is the same whether I try to send from my G4 laptop running OS 10.4, or my eMac running OS 10.3.9 , or from .mac web mail.
The alert I am receiving says: "The sender address [email protected] was rejected by the server."
I am using the SMTP outgoing mail server, not POP.
I can still receive e-mail with no difficulty.
I have changed no settings.
What's up? -
Sending mail with authentication
Dear All,
I am trying to send mail with authentication. My Mail server requires username and password while sending mails from Netscape.
But when I am sending mail through java mail api, I can send email with wrong username and password.
Actually when I enable debug, I am getting the following prints.
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG: SMTPTransport trying to connect to host "vkarthik.net.com", port 25
DEBUG SMTP RCVD: 220 vkarthik.net.com ESMTP Sendmail 8.12.5/8.12.5; Thu, 8 Jan 2004 21:04:59 +0530
DEBUG SMTP SENT: helo saravanakumar.net.com
DEBUG SMTP RCVD: 250 vkarthik.net.com Hello saravanakumar [192.168.4.50], pleased to meet you
DEBUG: SMTPTransport connected to host "vkarthik.net.com", port: 25
DEBUG SMTP SENT: NOOP
DEBUG SMTP RCVD: 250 2.0.0 OK
DEBUG SMTP SENT: mail from: <[email protected]>
DEBUG SMTP RCVD: 250 2.1.0 <[email protected]>... Sender ok
DEBUG SMTP SENT: rcpt to: <vkarthik>
DEBUG SMTP RCVD: 250 2.1.5 <vkarthik>... Recipient ok
Verified Addresses
vkarthik
DEBUG SMTP SENT: data
DEBUG SMTP RCVD: 354 Enter mail, end with "." on a line by itself
DEBUG SMTP SENT:
DEBUG SMTP RCVD: 250 2.0.0 i08FYxbY017757 Message accepted for delivery
I set mail.smtp.auth as true correctly.
When I browse through this forum I found that authentication is performed If we get debug prints as follows.
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG: SMTPTransport trying to connect to host "smtp.mail.yahoo.com", port 25
DEBUG SMTP RCVD: 220 smtp011.mail.yahoo.com ESMTP
DEBUG: SMTPTransport connected to host "smtp.mail.yahoo.com", port: 25
DEBUG SMTP SENT: EHLO wva24-d9kzst01
DEBUG SMTP RCVD: 250-smtp011.mail.yahoo.com
250-AUTH=LOGIN PLAIN
250-PIPELINING
250 8BITMIME
DEBUG SMTP Found extension "AUTH=LOGIN", arg "PLAIN"
DEBUG SMTP Found extension "PIPELINING", arg ""
DEBUG SMTP Found extension "8BITMIME", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP use AUTH=LOGIN hack
DEBUG SMTP SENT: AUTH LOGIN
DEBUG SMTP RCVD: 334 VXNlcm5hbWU6
I guess the following statement is missing in my case.
DEBUG SMTP: useEhlo true, useAuth true
Could You please let me know why I am not getting this? Am I doing something wrong in my code?
Or it is a problem in the mail server?
Thanking you,
SaravanakumarHi Sravankumar,
Can you please let me know the Version of the JDK which you used earlier, which had those old mail.jar & activation.jar files through which you were able to send mails without SMTP authentication.
Another thing which I wanted to know from you is that were the mails reaching the destination. I want to make sure about this since,even though SMTP Authentication at the client side is disabled, if the SMTP Mail Server does not accept invalid Email IDs as userIDs, then I guess we will not be able to send mails. Please clarify on this.
My requirement is that I want to send mails without a valid User Login through that SMTP Mail Server.
If possible also please send across the piece of code which does the same
Regards,
Madhukar KR
Maybe you are looking for
-
I've got several HTML articles, one is a search page. When you click a search result I am setting a variable in localStorage for the search query so it can be highlighted on the result page. When you get to the result page however, 99% of the time it
-
Yesterday and today the top half of my Edit Menu in Safari 5.1.10 is grayed out and unusable. I have tried everything I can think of including reinstalling Safari, repairing permissions, restarting. I am at a loss. Can someone tell me what to do t
-
Hi Friends, I need expertise help in pdf email attachment. I have data in internal table which has to be sent as pdf mail attachment. I need help in converting the data to pdf format. After conversion I can use SO_NEW_DOCUMENT_ATT_SEND_API1 to send t
-
How can I create projects larger than 7GB?
I want to creat a project and it will be very large... over 10GB. I know that because I finnished only two thirds of it and it already 7GB size (I get the warnning message all the time) Is there any way to create a larger projects? I dont want to bur
-
10.6 Snow Leopard on white Macbook Intel Core 2 Duo
I am trying to install 10.6 Snow Leopard on an older Macbook 2.4ghz Intel Core 2 Duo with 4gb of RAM. I keep getting a message that this software cannot be installed on this comouter. But according to my research it should be able to be installed.