This paper studies a regression model where both predictor and response variables are random functions. We consider a functional linear model where the conditional mean of the response variable at each time point is given by a linear functional of the predictor variable. In this paper, we are interested in estimation of the integral kernel $b(s,t)$ of the conditional expectation operator, where $s$ is an output variable while $t$ is a variable that interacts with the predictor variable. This problem is an ill-posed inverse problem, and we consider two estimators based on the functional principal component analysis (PCA). We show that under suitable regularity conditions, an estimator based on the single truncation attains the convergence rate for the integrated squared error that is characterized by smoothness of the function $b (s,t)$ in $t$ together with the decay rate of the eigenvalues of the covariance operator, but the rate does not depend on smoothness of $b(s,t)$ in $s$. This rate is shown to be minimax optimal, and consequently smoothness of $b(s,t)$ in $s$ does not affect difficulty of estimating $b$. We also consider an alternative estimator based on the double truncation, and provide conditions under which the alternative estimator attains the optimal rate. We conduct simulations to verify the performance of PCA-based estimators in the finite sample. Finally, we apply our estimators to investigate the relation between the lifetime pattern of working hours and total income, and the relation between the electricity spot price and the wind power infeed.